summaryrefslogtreecommitdiffstats
path: root/net/bridge/br_mdb.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2020-09-07 12:56:07 +0300
committerJakub Kicinski <kuba@kernel.org>2020-09-07 13:16:34 -0700
commit8b671779b7e2db78664cf05a03ced49bcaa37874 (patch)
tree8ebb059cb1d490b9c7c792b6d53992e5c0aa92ba /net/bridge/br_mdb.c
parent681590bd4cdc74f17dfbdfa792f027772e149e1d (diff)
downloadlinux-8b671779b7e2db78664cf05a03ced49bcaa37874.tar.bz2
net: bridge: mcast: add support for group source list
Initial functions for group source lists which are needed for IGMPv3 and MLDv2 include/exclude lists. Both IPv4 and IPv6 sources are supported. User-added mdb entries are created with exclude filter mode, we can extend that later to allow user-supplied mode. When group src entries are deleted, they're freed from a workqueue to make sure their timers are not still running. Source entries are protected by the multicast_lock and rcu. The number of src groups per port group is limited to 32. v4: use the new port group del function directly add igmpv2/mldv1 bool to denote if the entry was added in those modes, it will later replace the old update_timer bool v3: add IPv6 support v2: allow src groups to be traversed under rcu Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge/br_mdb.c')
-rw-r--r--net/bridge/br_mdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index 9a975e2a2489..559bdc256a1e 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -638,7 +638,8 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port,
break;
}
- p = br_multicast_new_port_group(port, group, *pp, state, NULL);
+ p = br_multicast_new_port_group(port, group, *pp, state, NULL,
+ MCAST_EXCLUDE);
if (unlikely(!p))
return -ENOMEM;
rcu_assign_pointer(*pp, p);