diff options
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r-- | net/bridge/br_fdb.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 96ab1d1748d0..b4005f5b28f4 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -114,12 +114,20 @@ void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr) | |||
114 | if (op != p && | 114 | if (op != p && |
115 | ether_addr_equal(op->dev->dev_addr, | 115 | ether_addr_equal(op->dev->dev_addr, |
116 | f->addr.addr) && | 116 | f->addr.addr) && |
117 | nbp_vlan_find(op, vid)) { | 117 | (!vid || nbp_vlan_find(op, vid))) { |
118 | f->dst = op; | 118 | f->dst = op; |
119 | goto skip_delete; | 119 | goto skip_delete; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | 122 | ||
123 | /* maybe bridge device has same hw addr? */ | ||
124 | if (ether_addr_equal(br->dev->dev_addr, | ||
125 | f->addr.addr) && | ||
126 | (!vid || br_vlan_find(br, vid))) { | ||
127 | f->dst = NULL; | ||
128 | goto skip_delete; | ||
129 | } | ||
130 | |||
123 | /* delete old one */ | 131 | /* delete old one */ |
124 | fdb_delete(br, f); | 132 | fdb_delete(br, f); |
125 | skip_delete: | 133 | skip_delete: |