Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5607355imu; Mon, 26 Nov 2018 02:56:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQgElbnsL5SPmj91R0gzVfmEKT+XG0lkJAsBsWh2idQjOywm5jSV5bjUJtiYvKQhWQJbmq X-Received: by 2002:a63:dc0c:: with SMTP id s12mr24639269pgg.398.1543229773103; Mon, 26 Nov 2018 02:56:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543229773; cv=none; d=google.com; s=arc-20160816; b=bi++yRre7tg3KEi2O8gG4lLYDT37HK3KHRWhKur2T4SylfdI3scP8AZrJH5IQ1447q R+Tr6wRrbZP/8m63lhsewHNf0xGMPBEeXWK3ey0QC4YqFv34DjJE7XBuy5BUyLGYOrM5 H0Wa1Lv49iuO30DSNkGIeK7L7BDRH7bffvutOPWQ+azq9YkTOwQwsCtWWBX4yWTdr1AM Umkhux7k7/p6eI/r7hcAsuIqit/EWDyI64oy1ioG5L+IoCbCJKSKjZo2gSMSE+n/IWb+ 4ay37BFgZDY7xk+gUW6B2zjZdJntni+yaD9gIw0OCy7OGRs6iSWc2kNsdtZBZsiV7uCd gbbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HEKXpsNulcvbuXUyoT2HM7O8NGSKb1rkj6gv0wnyHIc=; b=1BoY5iPSyTqCP8iaWHu+diXd4SvghnkU47LOlaZe2JOpDd0xvh1V5uPRIEA+PYts+T Ayf18ou708azl2ZMZS5OYIuqr/SwORFSd1qVKCsoe3v8LirdUZtnFbDFe3lhiSfwUMb+ e7gZPand68NJUWSENaV/Tqt2LlWtozHsvHcMt1s/JYGTsa/c4eW57Cb/idNkoJigivMB 1RAPvOCrEgyqn341XLS3A1cuinox7Xf11yMgZXExlVBOIPE1LwF6uspGsskypPMwvrfp YdTI3kesLM9p9rHFNkPRg1r8Mi+JbKDSLdPK3549LDtuM+ac1oEH7rGSfD8kqmcmpVoO 7gqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X2rmLrQj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si34232858plg.87.2018.11.26.02.55.58; Mon, 26 Nov 2018 02:56:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=X2rmLrQj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727038AbeKZVr3 (ORCPT + 99 others); Mon, 26 Nov 2018 16:47:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:55664 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbeKZVr3 (ORCPT ); Mon, 26 Nov 2018 16:47:29 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9C51721104; Mon, 26 Nov 2018 10:53:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229625; bh=YcLRKx9cJjI5uz7QbDLc1wvpJKThjxyLlvoYwBODe/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X2rmLrQjLrlnA3iHpgQuHJMWfHGLoT6QWiskEG6HLdacsmo3FZR1fXYm8Qkf72mLY bZpyUPWWIikekZQxE8tA+Vusds22PzKt3XbQM30CtrmKtzsRMhdlwxTG65KglU/nOC MRm9WgOALvSxQEu9Z3rZ9txwHOD+1KGbDSS7JOX8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sabrina Dubroca , Stefano Brivio , "David S. Miller" Subject: [PATCH 4.4 02/70] ip_tunnel: dont force DF when MTU is locked Date: Mon, 26 Nov 2018 11:50:17 +0100 Message-Id: <20181126105047.086636327@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105046.722096341@linuxfoundation.org> References: <20181126105046.722096341@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sabrina Dubroca [ Upstream commit 16f7eb2b77b55da816c4e207f3f9440a8cafc00a ] The various types of tunnels running over IPv4 can ask to set the DF bit to do PMTU discovery. However, PMTU discovery is subject to the threshold set by the net.ipv4.route.min_pmtu sysctl, and is also disabled on routes with "mtu lock". In those cases, we shouldn't set the DF bit. This patch makes setting the DF bit conditional on the route's MTU locking state. This issue seems to be older than git history. Signed-off-by: Sabrina Dubroca Reviewed-by: Stefano Brivio Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/ip_tunnel_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -71,7 +71,7 @@ int iptunnel_xmit(struct sock *sk, struc iph->version = 4; iph->ihl = sizeof(struct iphdr) >> 2; - iph->frag_off = df; + iph->frag_off = ip_mtu_locked(&rt->dst) ? 0 : df; iph->protocol = proto; iph->tos = tos; iph->daddr = dst;