aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_multicast.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@nvidia.com>2020-09-22 10:30:21 +0300
committerDavid S. Miller <davem@davemloft.net>2020-09-23 13:24:34 -0700
commit8f8cb77e0b22d9044d8d57ab3bb18ea8d0474752 (patch)
tree5bc595765ae051f70a7e629a33cf109f04810dee /net/bridge/br_multicast.c
parentnet: bridge: mcast: when igmpv3/mldv2 are enabled lookup (S,G) first, then (*,G) (diff)
downloadlinux-dev-8f8cb77e0b22d9044d8d57ab3bb18ea8d0474752.tar.xz
linux-dev-8f8cb77e0b22d9044d8d57ab3bb18ea8d0474752.zip
net: bridge: mcast: add rt_protocol field to the port group struct
We need to be able to differentiate between pg entries created by user-space and the kernel when we start generating S,G entries for IGMPv3/MLDv2's fast path. User-space entries are created by default as RTPROT_STATIC and the kernel entries are RTPROT_KERNEL. Later we can allow user-space to provide the entry rt_protocol so we can differentiate between who added the entries specifically (e.g. clag, admin, frr etc). Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_multicast.c')
-rw-r--r--net/bridge/br_multicast.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 4fd690bc848f..b6e7b0ece422 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -795,7 +795,8 @@ struct net_bridge_port_group *br_multicast_new_port_group(
struct net_bridge_port_group __rcu *next,
unsigned char flags,
const unsigned char *src,
- u8 filter_mode)
+ u8 filter_mode,
+ u8 rt_protocol)
{
struct net_bridge_port_group *p;
@@ -807,6 +808,7 @@ struct net_bridge_port_group *br_multicast_new_port_group(
p->port = port;
p->flags = flags;
p->filter_mode = filter_mode;
+ p->rt_protocol = rt_protocol;
p->mcast_gc.destroy = br_multicast_destroy_port_group;
INIT_HLIST_HEAD(&p->src_list);
rcu_assign_pointer(p->next, next);
@@ -892,7 +894,8 @@ static int br_multicast_add_group(struct net_bridge *br,
break;
}
- p = br_multicast_new_port_group(port, group, *pp, 0, src, filter_mode);
+ p = br_multicast_new_port_group(port, group, *pp, 0, src, filter_mode,
+ RTPROT_KERNEL);
if (unlikely(!p))
goto err;
rcu_assign_pointer(*pp, p);