Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp153817imu; Wed, 21 Nov 2018 17:10:05 -0800 (PST) X-Google-Smtp-Source: AFSGD/V6ubTZuslb2IXG5IPxR7H86RU9ucmXLH8ESFQS3aX9rD86yLQTF5A6w46QbTt+2XYb4Yh9 X-Received: by 2002:a62:5f07:: with SMTP id t7mr3292316pfb.108.1542849005816; Wed, 21 Nov 2018 17:10:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542849005; cv=none; d=google.com; s=arc-20160816; b=ryI6HGjxjRb9qrzig4QSMbSrlShaYUdHNZ74Lt4LoHYHAc4td3rVlVucN8tr4tr3Dl inyRUbR1Clx5nkuBhiNiKt2Bpi6xuqULAycw8o9INOlqVKgw2CscIeq8IUESDu9g/hDD sErudnTQaflQHH2iIiHjeTmkPo3m+6BeXTJPlah12V/8v+rRIT+1HVv2SxUoL9jBvBZ9 hJaFn4NFIAvbhLiKbON6B/vLBkcAm8qEHcXeIMuDjgyKKZebeGVncZNf2CCm0iv2swLw fW8gT+hVzSSTrxQbUIBe7zDerJdX1xzRuX1CDNplFh//xqZq6cX4b/ZRxlqcFWZLisex JDfw== 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=8QMnr7lTlOTPuMQtfloKfU7oJve/kD+QMHTBtHXLbbo=; b=ver76gf7RdoMgTuXwt+oCLOX/izN0ctiIBxTz7gGlfhcR3P5OxzxzgxF+4GWch5vnr 8py3qfhm/RFx/BZCELe/08PX3htaQqF0JvHOM1ikRX+eTmjWYI8lA8d3E7MAGl3NfOFy gtDOwt7s5XDOMUePHwyFInyIe8pR9+E+TMRPxiwHUfaLKG7G0Yxta8cVRu/AL0b7pp1o TC2fiE46KaB3fHJWiGdoQ6OzLMwyTr3aFa49NxkRE+NSkLpmuZK3X4trUWjPGXLaVLJv z5GyDMb1Buqvsw2wQd4nGTH7BpVZlDEpoRw01dsaQdySm8WOlgwVwo4xVfBfLHJ4qvfw PzIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=souWccjm; 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 c6si27295528plr.414.2018.11.21.17.09.50; Wed, 21 Nov 2018 17:10:05 -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=souWccjm; 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 S2388756AbeKVFqH (ORCPT + 99 others); Thu, 22 Nov 2018 00:46:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:41208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729285AbeKVFqG (ORCPT ); Thu, 22 Nov 2018 00:46:06 -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 A7FB2206BB; Wed, 21 Nov 2018 19:10:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542827433; bh=4EFCMJRHFg9/ziHY3oZGMU7f7yiRahbXSWv3Y7Ln6FA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=souWccjmmpCDonFquX8BQVmivRuEyFNh9tloolvzSufuGDuCN6z+t2FiWo2s1G5IK Nl1Njb5CvRqEYEsazgRPAnDl6deU4BwSFkJJGq8srTfc2xwAsKl63Rl9tkCRBCXpn8 4U1QsteAou8DZs0Hny04fQrv7tkXH9oUHQGCw9To= 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.9 03/59] ip_tunnel: dont force DF when MTU is locked Date: Wed, 21 Nov 2018 20:06:18 +0100 Message-Id: <20181121183508.392179084@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121183508.262873520@linuxfoundation.org> References: <20181121183508.262873520@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.9-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 @@ -80,7 +80,7 @@ void iptunnel_xmit(struct sock *sk, stru 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;