From patchwork Mon May 18 17:36:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 225845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A8E0C433DF for ; Mon, 18 May 2020 17:45:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1C4FA20657 for ; Mon, 18 May 2020 17:45:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589823938; bh=xy+Y9XI0kG1f8Pu63JShmxH5Fg/KC5WG2EGzsp6SV2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SgjVK8Ffg+25ftWQN8Wj2USi/wE8YweBSKtGEbvhN+l7cCer33vOG7w6Y5EinySXc aZzeNaghT2r4GP5JK63OFCzjGYmrRFDYU3x8f0iC79m8zgIafM+DNu2UGj+A8k6b4o +/1NLNgRctUapZTjal1X72u2C8Cc5Iqq/ksanx6c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729970AbgERRpg (ORCPT ); Mon, 18 May 2020 13:45:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:44496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729965AbgERRpf (ORCPT ); Mon, 18 May 2020 13:45:35 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 789D420657; Mon, 18 May 2020 17:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589823934; bh=xy+Y9XI0kG1f8Pu63JShmxH5Fg/KC5WG2EGzsp6SV2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vvFrZMopJlMo5z4Ts/3KqW+akAFIDz/wAbQ6fpi15HBrdQezwsydaa5eiTTu5fnpL eYORbCR3rdy9MPNtAZC2z7V3UPCL85Hkiu87RoKytE2COLpZsAAbys5ZZNeJjhaHlw 55z+V9OMTzpaCsTIcmwOsifNLyVskmVWDWQSa8PU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Willem de Bruijn , Xin Long , Hannes Frederic Sowa , =?utf-8?q?Maciej_=C5=BBenczykowski?= , "David S. Miller" Subject: [PATCH 4.9 70/90] Revert "ipv6: add mtu lock check in __ip6_rt_update_pmtu" Date: Mon, 18 May 2020 19:36:48 +0200 Message-Id: <20200518173505.463294723@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200518173450.930655662@linuxfoundation.org> References: <20200518173450.930655662@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: "Maciej Żenczykowski" [ Upstream commit 09454fd0a4ce23cb3d8af65066c91a1bf27120dd ] This reverts commit 19bda36c4299ce3d7e5bce10bebe01764a655a6d: | ipv6: add mtu lock check in __ip6_rt_update_pmtu | | Prior to this patch, ipv6 didn't do mtu lock check in ip6_update_pmtu. | It leaded to that mtu lock doesn't really work when receiving the pkt | of ICMPV6_PKT_TOOBIG. | | This patch is to add mtu lock check in __ip6_rt_update_pmtu just as ipv4 | did in __ip_rt_update_pmtu. The above reasoning is incorrect. IPv6 *requires* icmp based pmtu to work. There's already a comment to this effect elsewhere in the kernel: $ git grep -p -B1 -A3 'RTAX_MTU lock' net/ipv6/route.c=4813= static int rt6_mtu_change_route(struct fib6_info *f6i, void *p_arg) ... /* In IPv6 pmtu discovery is not optional, so that RTAX_MTU lock cannot disable it. We still use this lock to block changes caused by addrconf/ndisc. */ This reverts to the pre-4.9 behaviour. Cc: Eric Dumazet Cc: Willem de Bruijn Cc: Xin Long Cc: Hannes Frederic Sowa Signed-off-by: Maciej Żenczykowski Fixes: 19bda36c4299 ("ipv6: add mtu lock check in __ip6_rt_update_pmtu") Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/route.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1373,8 +1373,10 @@ static void __ip6_rt_update_pmtu(struct { struct rt6_info *rt6 = (struct rt6_info *)dst; - if (dst_metric_locked(dst, RTAX_MTU)) - return; + /* Note: do *NOT* check dst_metric_locked(dst, RTAX_MTU) + * IPv6 pmtu discovery isn't optional, so 'mtu lock' cannot disable it. + * [see also comment in rt6_mtu_change_route()] + */ dst_confirm(dst); mtu = max_t(u32, mtu, IPV6_MIN_MTU);