From: Nikolay Aleksandrov <razor@blackwall.org>
To: Shengyu Qu <wiagn233@outlook.com>,
idosch@nvidia.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
bridge@lists.linux.dev, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Felix Fietkau <nbd@nbd.name>
Subject: Re: [PATCH net-next v3] net: bridge: locally receive all multicast packets if IFF_ALLMULTI is set
Date: Tue, 15 Apr 2025 12:39:58 +0300 [thread overview]
Message-ID: <8b338c8b-9514-43e4-b1b8-3240b3bde798@blackwall.org> (raw)
In-Reply-To: <OSZPR01MB8434308370ACAFA90A22980798B32@OSZPR01MB8434.jpnprd01.prod.outlook.com>
On 4/14/25 13:56, Shengyu Qu wrote:
> If multicast snooping is enabled, multicast packets may not always end up
> on the local bridge interface, if the host is not a member of the multicast
> group. Similar to how IFF_PROMISC allows all packets to be received
> locally, let IFF_ALLMULTI allow all multicast packets to be received.
>
> OpenWrt uses a user space daemon for DHCPv6/RA/NDP handling, and in relay
> mode it sets the ALLMULTI flag in order to receive all relevant queries on
> the network.
>
> This works for normal network interfaces and non-snooping bridges, but not
> snooping bridges (unless multicast routing is enabled).
>
> Reported-by: Felix Fietkau <nbd@nbd.name>
> Closes:https://github.com/openwrt/openwrt/issues/15857#issuecomment-2662851243
> Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
> ---
> Changes since v1:
> - Move to net-next
> - Changed code according to Nikolay's advice
>
> Changes since v2:
> - Fix alignment
> - Remove redundant parenthesis
> - Add more infomation in commit message
> ---
> net/bridge/br_input.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
> index 232133a0fd21..5f6ac9bf1527 100644
> --- a/net/bridge/br_input.c
> +++ b/net/bridge/br_input.c
> @@ -189,7 +189,8 @@ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb
> if ((mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) &&
> br_multicast_querier_exists(brmctx, eth_hdr(skb), mdst)) {
> if ((mdst && mdst->host_joined) ||
> - br_multicast_is_router(brmctx, skb)) {
> + br_multicast_is_router(brmctx, skb) ||
> + br->dev->flags & IFF_ALLMULTI) {
> local_rcv = true;
> DEV_STATS_INC(br->dev, multicast);
> }
Thanks,
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
next prev parent reply other threads:[~2025-04-15 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-14 10:56 Shengyu Qu
2025-04-15 6:10 ` Ido Schimmel
2025-04-15 9:39 ` Nikolay Aleksandrov [this message]
2025-04-16 1:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b338c8b-9514-43e4-b1b8-3240b3bde798@blackwall.org \
--to=razor@blackwall.org \
--cc=bridge@lists.linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wiagn233@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®