Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4120790ioo; Mon, 30 May 2022 18:56:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjRDNY46s0V++GdQvl2qmLBXKvQQD7OR2Ehdu72V0Shcj0/BNSLEQh5ITkhKIB6889lge/ X-Received: by 2002:a17:90b:350d:b0:1e0:436a:d553 with SMTP id ls13-20020a17090b350d00b001e0436ad553mr25721118pjb.147.1653962174454; Mon, 30 May 2022 18:56:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653962174; cv=none; d=google.com; s=arc-20160816; b=Zx0V14notuf8ko0D3aGk3jtbILGzarvddN2xX/b7NLHmm3qNEbEhCSlftzeFg3PZgB JvHye8GC42O2d9kwLzjn78sA+ozBBG4TfwvFV1e8TKFjjRjLsmFm3I8M6somwluxPpVB kSh+WiHsQmJoBgUqk24pCtZjtZBiCujPOYJLe2JXKVbyWHRMzkCrv8ntR6X2A9pSa6fH 1w+VGFUBWhe0bhXbBjqw8fegXFv5GUzNqvAKzEXIcNePxMTwPKwyijl3Fe2h22Us9jRT FgmUV+cTlPwuyyTZdiuW/oP7wmJoHz5ehFANh5oJjQkFgeVgYRcqOgu6+Sd7K2Bnqt2N Aqzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8dn2KBrLjAw/J90gSLIUSlKsf9NiKPqOlZfVyd4DSHQ=; b=INieqBdfeEfAZ6H1bxRG5F0X2Rkm7lQPeGZ+2evqm73sqEkdYJ4RazXbn9SSednyiW +tJfCpukEpnQALY/Wo9OMGw62anzZH9U3QyoB35DI0YvONTo8hW/yO1AP8RQCEj4U3wU jEByOhkHK6LMIU4Eh0h2WvWfakm8GJimUYjr2QKfokn+O6kiP3Q5vzP3Lsp9WkudobBi /m30HEBS4FUHL6JLHyy13k1Vsum+f4PwSQb+1v9FtDaQjo/AuzN2Htsn+McdlwkMW5Ns E6Op5She6No/QLXt1RJ08eEKVUKelG33XJPHKocSgDC4H2q+KPsLjogoA/MJBFbkx9ct uO5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YuyVmikX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a12-20020a63d20c000000b003f9d5d519dcsi18419259pgg.574.2022.05.30.18.56.03; Mon, 30 May 2022 18:56:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YuyVmikX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241472AbiE3OwO (ORCPT + 99 others); Mon, 30 May 2022 10:52:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242538AbiE3ObQ (ORCPT ); Mon, 30 May 2022 10:31:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3632212C94F; Mon, 30 May 2022 06:53:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 860EB6102C; Mon, 30 May 2022 13:52:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CC3FEC3411F; Mon, 30 May 2022 13:52:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653918766; bh=08NwnF+qXnGXX79nWA1cKEM+XSZ7RbJgnHlUqUkWFRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YuyVmikX7JI7X1wI+oM2oGgbsi7AImuFjVE4YKjYMlBn/nv30sFyf/MNnmWvLRYeG NeAmLaMaqcQNH0XKufLu1cot+WZgLV8PP5DOk+orA9n9V9CISpHsQcoot+fyt28iJc 2TdOfj8waCVPv/oGa7qaorWSaGv+yWG4RqQ0AsTSMETShbfStKgEpbWCU1tJs4KHPu aYemsgIkTRbW7Pw79/pdBbps0U5Yu53oUAfU4LPJns/DfKQ2nyOCdsc224UBIZGnIj H0EoGTD39kHZoN8EOjEDhvjM+ii4N+ZJ64BYT1jPK+zOvWCIHGJy8IKvAMde4ZQgKy gXdWj2iVlou/A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: jianghaoran , Jakub Kicinski , Sasha Levin , davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 13/24] ipv6: Don't send rs packets to the interface of ARPHRD_TUNNEL Date: Mon, 30 May 2022 09:52:00 -0400 Message-Id: <20220530135211.1937674-13-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220530135211.1937674-1-sashal@kernel.org> References: <20220530135211.1937674-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: jianghaoran [ Upstream commit b52e1cce31ca721e937d517411179f9196ee6135 ] ARPHRD_TUNNEL interface can't process rs packets and will generate TX errors ex: ip tunnel add ethn mode ipip local 192.168.1.1 remote 192.168.1.2 ifconfig ethn x.x.x.x ethn: flags=209 mtu 1480 inet x.x.x.x netmask 255.255.255.255 destination x.x.x.x inet6 fe80::5efe:ac1e:3cdb prefixlen 64 scopeid 0x20 tunnel txqueuelen 1000 (IPIP Tunnel) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 3 dropped 0 overruns 0 carrier 0 collisions 0 Signed-off-by: jianghaoran Link: https://lore.kernel.org/r/20220429053802.246681-1-jianghaoran@kylinos.cn Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/ipv6/addrconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 30ca73c78125..02f62253a835 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3993,7 +3993,8 @@ static void addrconf_dad_completed(struct inet6_ifaddr *ifp, bool bump_id) send_rs = send_mld && ipv6_accept_ra(ifp->idev) && ifp->idev->cnf.rtr_solicits != 0 && - (dev->flags&IFF_LOOPBACK) == 0; + (dev->flags & IFF_LOOPBACK) == 0 && + (dev->type != ARPHRD_TUNNEL); read_unlock_bh(&ifp->idev->lock); /* While dad is in progress mld report's source address is in6_addrany. -- 2.35.1