--- zzzz-none-000/linux-5.4.213/net/bridge/br_multicast.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/net/bridge/br_multicast.c 2024-08-14 09:02:13.000000000 +0000 @@ -32,6 +32,8 @@ #include #endif +#include + #include "br_private.h" static const struct rhashtable_params br_mdb_rht_params = { @@ -185,6 +187,13 @@ del_timer(&p->timer); br_mdb_notify(br->dev, p->port, &pg->addr, RTM_DELMDB, p->flags); + + /* Must re-learn multicast sessions because of removed port + * group, otherwise avm_pa continues to forward to that port. + */ + if (p->addr.proto == htons(ETH_P_IP)) + avm_pa_flush_multicast_sessions_for_group(pg->addr.u.ip4); + kfree_rcu(p, rcu); if (!mp->ports && !mp->host_joined && @@ -574,7 +583,10 @@ br_mdb_notify(br->dev, port, group, RTM_NEWMDB, 0); found: + if (group->proto == htons(ETH_P_IP)) + avm_pa_flush_multicast_sessions_for_group(group->u.ip4); mod_timer(&p->timer, now + br->multicast_membership_interval); + out: err = 0; @@ -724,7 +736,7 @@ skb->dev = port->dev; br_multicast_count(br, port, skb, igmp_type, BR_MCAST_DIR_TX); - NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, + BR_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, dev_net(port->dev), NULL, skb, NULL, skb->dev, br_dev_queue_push_xmit); } else { @@ -1903,6 +1915,8 @@ struct net_bridge_mdb_entry *mp; struct hlist_node *tmp; + avm_pa_flush_multicast_sessions(); + spin_lock_bh(&br->multicast_lock); hlist_for_each_entry_safe(mp, tmp, &br->mdb_list, mdb_node) { del_timer(&mp->timer);