aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bridge/br_multicast.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 020e463f2225..ecabf210d0d2 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1689,9 +1689,23 @@ unlock:
1689 return err; 1689 return err;
1690} 1690}
1691 1691
1692int br_multicast_toggle(struct net_bridge *br, unsigned long val) 1692static void br_multicast_start_querier(struct net_bridge *br)
1693{ 1693{
1694 struct net_bridge_port *port; 1694 struct net_bridge_port *port;
1695
1696 br_multicast_open(br);
1697
1698 list_for_each_entry(port, &br->port_list, list) {
1699 if (port->state == BR_STATE_DISABLED ||
1700 port->state == BR_STATE_BLOCKING)
1701 continue;
1702
1703 __br_multicast_enable_port(port);
1704 }
1705}
1706
1707int br_multicast_toggle(struct net_bridge *br, unsigned long val)
1708{
1695 int err = 0; 1709 int err = 0;
1696 struct net_bridge_mdb_htable *mdb; 1710 struct net_bridge_mdb_htable *mdb;
1697 1711
@@ -1721,14 +1735,7 @@ rollback:
1721 goto rollback; 1735 goto rollback;
1722 } 1736 }
1723 1737
1724 br_multicast_open(br); 1738 br_multicast_start_querier(br);
1725 list_for_each_entry(port, &br->port_list, list) {
1726 if (port->state == BR_STATE_DISABLED ||
1727 port->state == BR_STATE_BLOCKING)
1728 continue;
1729
1730 __br_multicast_enable_port(port);
1731 }
1732 1739
1733unlock: 1740unlock:
1734 spin_unlock_bh(&br->multicast_lock); 1741 spin_unlock_bh(&br->multicast_lock);