diff options
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_fdb.c | 5 | ||||
-rw-r--r-- | net/bridge/br_input.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 69b70977f000..eb57502bb264 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -384,6 +384,11 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, | |||
384 | if (hold_time(br) == 0) | 384 | if (hold_time(br) == 0) |
385 | return; | 385 | return; |
386 | 386 | ||
387 | /* ignore packets unless we are using this port */ | ||
388 | if (!(source->state == BR_STATE_LEARNING || | ||
389 | source->state == BR_STATE_FORWARDING)) | ||
390 | return; | ||
391 | |||
387 | fdb = fdb_find(head, addr); | 392 | fdb = fdb_find(head, addr); |
388 | if (likely(fdb)) { | 393 | if (likely(fdb)) { |
389 | /* attempt to update an entry for a local interface */ | 394 | /* attempt to update an entry for a local interface */ |
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index 5c18595b7616..6f468fc3357a 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
@@ -101,9 +101,8 @@ static int br_handle_local_finish(struct sk_buff *skb) | |||
101 | { | 101 | { |
102 | struct net_bridge_port *p = rcu_dereference(skb->dev->br_port); | 102 | struct net_bridge_port *p = rcu_dereference(skb->dev->br_port); |
103 | 103 | ||
104 | if (p && p->state != BR_STATE_DISABLED) | 104 | if (p) |
105 | br_fdb_update(p->br, p, eth_hdr(skb)->h_source); | 105 | br_fdb_update(p->br, p, eth_hdr(skb)->h_source); |
106 | |||
107 | return 0; /* process further */ | 106 | return 0; /* process further */ |
108 | } | 107 | } |
109 | 108 | ||