Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39685
b: refs/heads/master
c: 1a62069
h: refs/heads/master
i:
  39683: 972d03a
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Oct 16, 2006
1 parent 77f9ce5 commit bdf5b4b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ea8cfd6aa74e710f0cb0731ecb9dee53fbebfb9
refs/heads/master: 1a620698c29b5e18150ec04ace0609fb07d08d3e
7 changes: 6 additions & 1 deletion trunk/net/bridge/br_fdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ void br_fdb_cleanup(unsigned long _data)
mod_timer(&br->gc_timer, jiffies + HZ/10);
}

void br_fdb_delete_by_port(struct net_bridge *br, struct net_bridge_port *p)

void br_fdb_delete_by_port(struct net_bridge *br,
const struct net_bridge_port *p,
int do_all)
{
int i;

Expand All @@ -142,6 +145,8 @@ void br_fdb_delete_by_port(struct net_bridge *br, struct net_bridge_port *p)
if (f->dst != p)
continue;

if (f->is_static && !do_all)
continue;
/*
* if multiple ports all have the same device address
* then when one port is deleted, assign
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static void del_nbp(struct net_bridge_port *p)
br_stp_disable_port(p);
spin_unlock_bh(&br->lock);

br_fdb_delete_by_port(br, p);
br_fdb_delete_by_port(br, p, 1);

list_del_rcu(&p->list);

Expand Down Expand Up @@ -448,7 +448,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)

return 0;
err2:
br_fdb_delete_by_port(br, p);
br_fdb_delete_by_port(br, p, 1);
err1:
kobject_del(&p->kobj);
err0:
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bridge/br_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ extern void br_fdb_changeaddr(struct net_bridge_port *p,
const unsigned char *newaddr);
extern void br_fdb_cleanup(unsigned long arg);
extern void br_fdb_delete_by_port(struct net_bridge *br,
struct net_bridge_port *p);
const struct net_bridge_port *p, int do_all);
extern struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br,
const unsigned char *addr);
extern struct net_bridge_fdb_entry *br_fdb_get(struct net_bridge *br,
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/bridge/br_stp_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ void br_stp_disable_port(struct net_bridge_port *p)
del_timer(&p->forward_delay_timer);
del_timer(&p->hold_timer);

br_fdb_delete_by_port(br, p, 0);

br_configuration_update(br);

br_port_state_selection(br);
Expand Down

0 comments on commit bdf5b4b

Please sign in to comment.