From patchwork Tue Sep 29 08:07:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: XiaoXiong Ding X-Patchwork-Id: 1373109 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C0sSl3kLYz9s1t for ; Tue, 29 Sep 2020 18:07:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DB9DE85E0B; Tue, 29 Sep 2020 08:07:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mrt8pVztWX4q; Tue, 29 Sep 2020 08:07:48 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2EF9985DF9; Tue, 29 Sep 2020 08:07:48 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 16A80C0890; Tue, 29 Sep 2020 08:07:48 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id CB25DC016F for ; Tue, 29 Sep 2020 08:07:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B8EBB866F8 for ; Tue, 29 Sep 2020 08:07:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7a55fJHaVeNn for ; Tue, 29 Sep 2020 08:07:45 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from huawei.com (szxga03-in.huawei.com [45.249.212.189]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0C5758569B for ; Tue, 29 Sep 2020 08:07:44 +0000 (UTC) Received: from dggeme701-chm.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 10ECA44A30BB8FCCFD9F; Tue, 29 Sep 2020 16:07:38 +0800 (CST) Received: from dggeme761-chm.china.huawei.com (10.3.19.107) by dggeme701-chm.china.huawei.com (10.1.199.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Tue, 29 Sep 2020 16:07:37 +0800 Received: from dggeme761-chm.china.huawei.com ([10.6.66.35]) by dggeme761-chm.china.huawei.com ([10.6.66.35]) with mapi id 15.01.1913.007; Tue, 29 Sep 2020 16:07:37 +0800 From: dingxiaoxiong To: "dev@openvswitch.org" Thread-Topic: [PATCH] ofproto-dpif-xlate: Stop forwarding MLD reports to group ports. Thread-Index: AQHWljbcwAU5zYYrAU+Ezl80Tz0fPal/QlKA Date: Tue, 29 Sep 2020 08:07:37 +0000 Message-ID: <120c99c1dca64c569f57f8d80225f76c@huawei.com> References: <20200929080114.95604-1-dingxiaoxiong@huawei.com> In-Reply-To: <20200929080114.95604-1-dingxiaoxiong@huawei.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.243.44] MIME-Version: 1.0 X-CFilter-Loop: Reflected Cc: "fbl@sysclose.org" , "Guohongzhi \(Russell Lab\)" Subject: [ovs-dev] [PATCH] ofproto-dpif-xlate: Stop forwarding MLD reports to group ports. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" According with rfc4541 section 2.1.1, a snooping switch should forward membership reports only to ports with routers attached. The current code violates the RFC forwarding membership reports to group ports as well. The same issue doesn't exist with IPv4. Fixes: 06994f879c ("mcast-snooping: Add Multicast Listener Discovery support") Signed-off-by: XiaoXiong Ding --- ofproto/ofproto-dpif-xlate.c | 1 + 1 file changed, 1 insertion(+) -- 2.14.1.windows.1 diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index e0ede2cab..47571e790 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -3100,6 +3100,7 @@ xlate_normal(struct xlate_ctx *ctx) xlate_report(ctx, OFT_DETAIL, "MLD query, flooding"); xlate_normal_flood(ctx, in_xbundle, &xvlan); } + return; } else { if (is_ip_local_multicast(flow, wc)) { /* RFC4541: section 2.1.2, item 2: Packets with a dst IP