summaryrefslogtreecommitdiff
path: root/net/bridge/br_mdb.c
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@nvidia.com>2021-07-19 20:06:23 +0300
committerDavid S. Miller <davem@davemloft.net>2021-07-20 05:41:19 -0700
commit9632233e7de8da43711bb7cd3e054af32fedcc38 (patch)
treec4dda2c72af30e1c5963c7ea5e17386cae5e8d2a /net/bridge/br_mdb.c
parent23d2b94043ca8835bd1e67749020e839f396a1c2 (diff)
net: bridge: multicast: factor out port multicast context
Factor out the port's multicast context into a separate structure which will later be shared for per-port,vlan context. No functional changes intended. We need the structure even if bridge multicast is not defined to pass down as pointer to forwarding functions. Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_mdb.c')
-rw-r--r--net/bridge/br_mdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index 17a720b4473f..64619dc65bc8 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -29,16 +29,16 @@ static bool br_rports_have_mc_router(struct net_bridge *br)
static bool
br_ip4_rports_get_timer(struct net_bridge_port *port, unsigned long *timer)
{
- *timer = br_timer_value(&port->ip4_mc_router_timer);
- return !hlist_unhashed(&port->ip4_rlist);
+ *timer = br_timer_value(&port->multicast_ctx.ip4_mc_router_timer);
+ return !hlist_unhashed(&port->multicast_ctx.ip4_rlist);
}
static bool
br_ip6_rports_get_timer(struct net_bridge_port *port, unsigned long *timer)
{
#if IS_ENABLED(CONFIG_IPV6)
- *timer = br_timer_value(&port->ip6_mc_router_timer);
- return !hlist_unhashed(&port->ip6_rlist);
+ *timer = br_timer_value(&port->multicast_ctx.ip6_mc_router_timer);
+ return !hlist_unhashed(&port->multicast_ctx.ip6_rlist);
#else
*timer = 0;
return false;
@@ -79,7 +79,7 @@ static int br_rports_fill_info(struct sk_buff *skb, struct netlink_callback *cb,
nla_put_u32(skb, MDBA_ROUTER_PATTR_TIMER,
max(ip4_timer, ip6_timer)) ||
nla_put_u8(skb, MDBA_ROUTER_PATTR_TYPE,
- p->multicast_router) ||
+ p->multicast_ctx.multicast_router) ||
(have_ip4_mc_rtr &&
nla_put_u32(skb, MDBA_ROUTER_PATTR_INET_TIMER,
ip4_timer)) ||