From nobody Tue Apr 7 12:21:11 2026 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8301C275861 for ; Wed, 25 Feb 2026 10:00:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772013632; cv=none; b=QzGaBUqAmEZF34PB4kmxVcV4t/SvuznSeA1CwB7kJQhrzRrE6kCGlyV6CBzbbx3al1rSt48F0iHLrEmTsqCn0Z0EnF65uiQ5QNeerEvFCk5C5ZNWfCbulZL1EGFDDoqmE9w1b2QCG08dQ+tgDMt+0+EPSZAEJ82zQlcTltHQdGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772013632; c=relaxed/simple; bh=vkE5Ptfh8XqWofdz/fULhpBiTtYfPIvN8IrqcrvlObg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ptr5KQV/rM5i75NT4mPcrDmq0yEQelw645CZsePYGsAsK+UCpyicdKvNJbtJncMlV9W1VyYcHgpLoYVbh0Tuw/r5Mrd4Ej4q8gkQ/t9vKo+MEUkWsr1HDJFMlIfEsiP+T7k91D7p0GJPdufpt/3at8w8GzEvucEmv0bbtANZWQQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aw5PYJ0C; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aw5PYJ0C" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-827307b12dfso6599b3a.1 for ; Wed, 25 Feb 2026 02:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772013629; x=1772618429; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=byNHBdeiFuWhQTNwN2X3XtwxEIQfrl7XP2ei/RflPc4=; b=aw5PYJ0CgZuYCHSITfTU/MZE1jk+9enHkbjDPrhC1aD2jj+SRVHcYG9/50CihuWIJa owrKQ30xYGq62XTppUc+mei0fcvJZIJgFgRa8udxidpvOHSSzDOWLC63j/eukSR3kMRS TDV/fTQ6Ts1RyXe6gsxIWLHepH6XmwSCZ952fSypD16Nm3kadxZpaTO9NSYpdppWwkEu 6O6y5JQznhkhj9DQJeT+dxWeqGlERzLYeEA82TMGAul8LwD5hfvJUUelNqMafvE+Rb6C kVvXfj6FaDVBm/df2n24HC7cyT35rTuPY781FUbBSEgDpTgLUAFbcl5WkEctXSCsJlw/ V1bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772013629; x=1772618429; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=byNHBdeiFuWhQTNwN2X3XtwxEIQfrl7XP2ei/RflPc4=; b=nfg5bNXSI5Vt7n+JONn6kK/wK9K/LHcb1L/efYT218XWEIfQ10jmHOCpK9Qikcs/BA 4IwUms8n80Idn5SS56szqHYdaKaSIm3N3I1qWZOxOkk+Fy6WEAyZ+xbYlTCTKx2nT69r F/5AQ6tcy+CZZzWFfKDC7K2u+RMebPY9fhTcW0hKOn2Vz4h1UZNjiuhL8Dgm9VVKO5pY 0/hLrRoMPtb5f/T3jcNYIBEpCH0bYPhtDDTRF/fk3ESFKRH1SgPJtAvdeFlEVvRERV3v 9a+j3qiwfmOvFQOk+85f/LoYo+KdXRUkvQLEnEZYwqPt+3T7O7rjAX9ViTO7E4STF+3U W0iA== X-Forwarded-Encrypted: i=1; AJvYcCVHwE3Mtw1UUCs2yoqsvfyNGGhS42LNtqwihdf5Fv2ZdLRW6l9JOFAJIx3E3QGG96FORdi9X2oIGsT5d9E=@vger.kernel.org X-Gm-Message-State: AOJu0YxSiS+bh4l4RI1sSjpX6tB5iFFc/Is/5zIgeAaTaNg/IXayy+73 6ELh1vxUsK2AQKWAa7sB8FgX3qbAsZtXCRoaFaBEjNLTITkbirnr3U5C X-Gm-Gg: ATEYQzzjDZZXlaQduXGBfWBGp1M7JTAXNXClMRjB/0B+8hjSFqEs0BZ74J3ZMHdXcAj tB2S55A13mHvgSH7t7xxVhEVGn2Fqk9YWb2UOg630U285l3Zi6xA0iI/nsncHU1vh7fPZw4Fi3l h0Vk8NC58+OIxBnkj3PLmvgxDkfz309fi3hJXouKJZhb5ZQpgKAYVZutRkLsqz/zmZjFPaL8gn/ OHD51S9QVUjUxEdNLPs6rYHu6qdMhKHs/oPr3H2f93AWxO+iE7LdSi7idxDjXopqVw04M39VhQr GLr3fOT2Woq6b0lE35XWT/X3pJAx/wLpITo4+APtrcjpvmxz86PdD1m3dqJpxjGTfwItGDsuaJY RGtbESCuHps25HQxGrA5xYw6xbJyTh/4oDbNVGPTSpgA9nIkYuhLWPd7p/fiQ8hi7VD1HYaugNi TpFmBRgRVX9xZV6c+2cnLLd/ST3QlUblnsp/8qoGxVfzTgsk0= X-Received: by 2002:a05:6a00:28cd:b0:80f:4667:a94a with SMTP id d2e1a72fcca58-82720f81710mr2384242b3a.10.1772013628680; Wed, 25 Feb 2026 02:00:28 -0800 (PST) Received: from localhost.localdomain ([183.96.230.140]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-826dd690f19sm13134052b3a.22.2026.02.25.02.00.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 25 Feb 2026 02:00:28 -0800 (PST) From: Kibaek Yoo To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kibaek Yoo Subject: [PATCH] net: macvlan: fix multicast delivery to bridge ports with shared source MAC Date: Wed, 25 Feb 2026 19:00:24 +0900 Message-ID: <20260225100024.38937-1-psykibaek@gmail.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When a macvlan interface in bridge mode shares its MAC address with an external source (e.g., VRRP virtual MAC), incoming multicast frames from that external source are incorrectly identified as locally originated. macvlan_hash_lookup() matches the source MAC to a local macvlan, causing macvlan_multicast_rx() to skip delivery to bridge ports under the assumption they already received the frame during transmission. This assumption fails for protocols like VRRP where multiple hosts legitimately share the same virtual MAC address. The local macvlan never transmitted the frame, so bridge ports never saw it, yet the multicast is not delivered to them. Fix this by passing NULL as the source device and including MACVLAN_MODE_BRIDGE in the mode mask for the else branch of macvlan_multicast_rx(). This ensures all VEPA and bridge mode macvlan interfaces receive incoming multicast regardless of source MAC matching. The trade-off is that looped-back locally-originated multicasts may be delivered to bridge ports a second time, but multicast consumers already handle duplicate frames. Signed-off-by: Kibaek Yoo --- drivers/net/macvlan.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index a71f058ec..ea22909cb 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -313,11 +313,15 @@ static void macvlan_multicast_rx(const struct macvlan= _port *port, MACVLAN_MODE_BRIDGE); else /* - * flood only to VEPA ports, bridge ports - * already saw the frame on the way out. + * Flood to VEPA and bridge ports. We cannot distinguish + * a looped-back locally-originated multicast from one + * sent by an external source sharing the same source MAC + * (e.g., VRRP virtual MAC), so deliver to bridge ports + * as well to ensure correct reception in all cases. */ - macvlan_broadcast(skb, port, src->dev, - MACVLAN_MODE_VEPA); + macvlan_broadcast(skb, port, NULL, + MACVLAN_MODE_VEPA | + MACVLAN_MODE_BRIDGE); } =20 static void macvlan_process_broadcast(struct work_struct *w) --=20 2.50.1 (Apple Git-155)