Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp617545iog; Mon, 13 Jun 2022 09:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfcFSrB/OdmwnH79gfcnRGuw2flYWGnx6DldHO+XrOMZ1YCte1rPljqq5+GICd8z8uLD6/ X-Received: by 2002:a17:90b:3e88:b0:1e8:875e:366f with SMTP id rj8-20020a17090b3e8800b001e8875e366fmr16670939pjb.155.1655136868221; Mon, 13 Jun 2022 09:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655136868; cv=none; d=google.com; s=arc-20160816; b=AjvGvlhCORrRGY3DvZN02lI8TDbcZXCRcTecrEtk2JTY3harqkRYzwWn1ItjEooOFP gXYWJEtUgyQ4jP5/N/3DvIB7IGuQxDsbkCP/zKAjqsWRNk0QL4VCpUTJEF7Ji+kZWkrt Al7PTcR9X4Lgau+zO4eAMsY69bKIFvSzO4dFN127vMEERQIbrRfS7BgRmSwxYu70Zcym PvuaqIGbSvC8VqwXS56rhsYTc5qS4lOlxIz4WiRyNH0LrHNt6JpmldvsblUqtp47vnMV CPaPORbZuZQsrGBmGDlgSo9waUWFLHouw0EXHlYUNOMr+L9Y8+A4OSjWxn0Y2wDNGDXf LSxw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LPNhZejKAxVPY26P9kEyiTKgxxUnP6kOCm6tI85S2zE=; b=XXW4872PJL5SUnuwx81NB8LOGfkFwG5Qk8zMyjiqlwktOqgZctr4UvQmTxXpgkRTXp axqBtoA4SMdgDW6W2wawPqzwK+pSg3d8ki/xbKMwkVZ/qrPrPJikvnW1bNpV1XC2meBH SmNzmZoGCZuT0iFc0qmdBcuH/XiwOo3WUi8hMyQtc932hcUcW7Cig2SSbQiM3ZX13Hvv cEfYXnTTq29kJ5lcu+24BYsAvTrOXaRmTYOAgDKSpetCGgAAzE0VosXQrgVJNReWFB3Q qbfTIDieAOGMtDX8DkKcZMEmt8DD9QXKEjO9n2MxuTTMOrqWthsRYzPAXmYAwxIXvIwz V5QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m02GtW5M; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a637243000000b003fe25580540si10462111pgn.476.2022.06.13.09.14.16; Mon, 13 Jun 2022 09:14:28 -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=@linuxfoundation.org header.s=korg header.b=m02GtW5M; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346598AbiFMKhy (ORCPT + 99 others); Mon, 13 Jun 2022 06:37:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344821AbiFMKhF (ORCPT ); Mon, 13 Jun 2022 06:37:05 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9310411C1C; Mon, 13 Jun 2022 03:22:45 -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 sin.source.kernel.org (Postfix) with ESMTPS id EC002CE0EEB; Mon, 13 Jun 2022 10:22:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDF3BC34114; Mon, 13 Jun 2022 10:22:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115762; bh=MxBRfXlXQLUT75soDSKGi1x1t5WHTACug5T0lRzTfbk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m02GtW5MSKNYLNFYHhaUkmyrV/MerVlTPxvmXtUwE3+YaQ5hVYw2iNruDblEB2UCD +yjM9Fx9fp0IyZKQTKaubSlrUbQVCW5AScme2+cKC2fVFXQrTQGhW5M92hSSxPyzg5 TGjnGOo2KWm+35+5COThyHiXKhVclHo0DnsTbCgM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, jianghaoran , Jakub Kicinski , Sasha Levin Subject: [PATCH 4.14 022/218] ipv6: Dont send rs packets to the interface of ARPHRD_TUNNEL Date: Mon, 13 Jun 2022 12:08:00 +0200 Message-Id: <20220613094913.563479624@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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 09807202bd1c..0d3e76b160a5 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -4058,7 +4058,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