Commit 74857216 authored by Herbert Xu's avatar Herbert Xu Committed by David S. Miller

bridge: Add br_multicast_start_querier

This patch adds the helper br_multicast_start_querier so that
the code which starts the queriers in br_multicast_toggle can
be reused elsewhere.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 95c96174
...@@ -1689,9 +1689,23 @@ int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val) ...@@ -1689,9 +1689,23 @@ int br_multicast_set_port_router(struct net_bridge_port *p, unsigned long val)
return err; return err;
} }
int br_multicast_toggle(struct net_bridge *br, unsigned long val) static void br_multicast_start_querier(struct net_bridge *br)
{ {
struct net_bridge_port *port; struct net_bridge_port *port;
br_multicast_open(br);
list_for_each_entry(port, &br->port_list, list) {
if (port->state == BR_STATE_DISABLED ||
port->state == BR_STATE_BLOCKING)
continue;
__br_multicast_enable_port(port);
}
}
int br_multicast_toggle(struct net_bridge *br, unsigned long val)
{
int err = 0; int err = 0;
struct net_bridge_mdb_htable *mdb; struct net_bridge_mdb_htable *mdb;
...@@ -1721,14 +1735,7 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val) ...@@ -1721,14 +1735,7 @@ int br_multicast_toggle(struct net_bridge *br, unsigned long val)
goto rollback; goto rollback;
} }
br_multicast_open(br); br_multicast_start_querier(br);
list_for_each_entry(port, &br->port_list, list) {
if (port->state == BR_STATE_DISABLED ||
port->state == BR_STATE_BLOCKING)
continue;
__br_multicast_enable_port(port);
}
unlock: unlock:
spin_unlock_bh(&br->multicast_lock); spin_unlock_bh(&br->multicast_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment