Skip to content

Commit

Permalink
bridge: Add multicast start/stop hooks
Browse files Browse the repository at this point in the history
This patch hooks up the bridge start/stop and add/delete/disable
port functions to the new multicast module.

Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
herbertx authored and davem330 committed Feb 28, 2010
1 parent 5cb5e94 commit 3fe2d7c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion net/bridge/br_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ static int br_dev_open(struct net_device *dev)
br_features_recompute(br);
netif_start_queue(dev);
br_stp_enable_bridge(br);
br_multicast_open(br);

return 0;
}
Expand All @@ -61,7 +62,10 @@ static void br_dev_set_multicast_list(struct net_device *dev)

static int br_dev_stop(struct net_device *dev)
{
br_stp_disable_bridge(netdev_priv(dev));
struct net_bridge *br = netdev_priv(dev);

br_stp_disable_bridge(br);
br_multicast_stop(br);

netif_stop_queue(dev);

Expand Down
4 changes: 4 additions & 0 deletions net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ static void del_nbp(struct net_bridge_port *p)

rcu_assign_pointer(dev->br_port, NULL);

br_multicast_del_port(p);

kobject_uevent(&p->kobj, KOBJ_REMOVE);
kobject_del(&p->kobj);

Expand Down Expand Up @@ -207,6 +209,7 @@ static struct net_device *new_bridge_dev(struct net *net, const char *name)
br_netfilter_rtable_init(br);

br_stp_timer_init(br);
br_multicast_init(br);

return dev;
}
Expand Down Expand Up @@ -258,6 +261,7 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
br_init_port(p);
p->state = BR_STATE_DISABLED;
br_stp_port_timer_init(p);
br_multicast_add_port(p);

return p;
}
Expand Down
2 changes: 2 additions & 0 deletions net/bridge/br_stp.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ static void br_make_forwarding(struct net_bridge_port *p)
else
p->state = BR_STATE_LEARNING;

br_multicast_enable_port(p);

br_log_state(p);

if (br->forward_delay != 0)
Expand Down
1 change: 1 addition & 0 deletions net/bridge/br_stp_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void br_stp_disable_port(struct net_bridge_port *p)
del_timer(&p->hold_timer);

br_fdb_delete_by_port(br, p, 0);
br_multicast_disable_port(p);

br_configuration_update(br);

Expand Down

0 comments on commit 3fe2d7c

Please sign in to comment.