Re: [PATCH net-next v4 10/14] net: bridge: mcast: track active state, bridge up/down
From: Ido Schimmel <idosch@nvidia.com>
Date: 2026-03-09 15:58:22
Also in:
bridge, linux-kselftest, lkml
On Sat, Mar 07, 2026 at 05:45:44AM +0100, Linus Lüssing wrote:
quoted hunk ↗ jump to hunk
@@ -4478,6 +4487,9 @@ static void __br_multicast_stop(struct net_bridge_mcast *brmctx) timer_shutdown(&brmctx->ip6_other_query.delay_timer); timer_shutdown(&brmctx->ip6_own_query.timer); #endif + + /* bridge interface is down, set multicast state to inactive */ + br_multicast_update_active(brmctx); }
This suffers from the same problem that I already mentioned. __br_multicast_stop() is only called for VLANs that were added on the bridge. For the rest it does not update the active state. You can reproduce with [1]. [1] #!/bin/bash for ns in ns0 ns1; do ip netns del $ns &> /dev/null ip netns add $ns ip -n $ns link set dev lo up done ip -n ns0 link add name veth0 type veth peer name veth1 netns ns1 ip -n ns0 link add name br0 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 ip -n ns1 link add name br1 up type bridge vlan_filtering 1 mcast_snooping 1 mcast_vlan_snooping 1 ip -n ns0 link set dev veth0 up master br0 ip -n ns1 link set dev veth1 up master br1 bridge -n ns0 vlan add vid 10 dev veth0 master bridge -n ns1 vlan add vid 10 dev veth1 master sleep 5 bridge -n ns0 vlan global set vid 10 dev br0 mcast_snooping 1 mcast_query_response_interval 100 mcast_querier 1 bridge -n ns1 vlan global set vid 10 dev br1 mcast_snooping 1 mcast_query_response_interval 100 mcast_querier 0 sleep 5 bridge -n ns1 -j -p vlan global show dev br1 vid 10 | jq '.[]["vlans"][]["mcast_active_v4"]' ip -n ns1 link set dev br1 down sleep 5 bridge -n ns1 -j -p vlan global show dev br1 vid 10 | jq '.[]["vlans"][]["mcast_active_v4"]'