diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:27:41 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:27:41 -0500 |
| commit | d347da0deffa1d8f88f0d270eab040e4707c9916 (patch) | |
| tree | e0911f2ef4d36a7b44f7a5379feabebbd37dcfc4 /net/bridge/br_input.c | |
| parent | c6c88bbde4d8b2ffe9886b7130b2e23781d424e5 (diff) | |
| parent | 74cb8798222bb7d1aecb0acb91e6eeedf5feb948 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/bridge/br_input.c')
| -rw-r--r-- | net/bridge/br_input.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index b88220a64cd8..c387852f753a 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c | |||
| @@ -53,6 +53,11 @@ int br_handle_frame_finish(struct sk_buff *skb) | |||
| 53 | /* insert into forwarding database after filtering to avoid spoofing */ | 53 | /* insert into forwarding database after filtering to avoid spoofing */ |
| 54 | br_fdb_update(p->br, p, eth_hdr(skb)->h_source); | 54 | br_fdb_update(p->br, p, eth_hdr(skb)->h_source); |
| 55 | 55 | ||
| 56 | if (p->state == BR_STATE_LEARNING) { | ||
| 57 | kfree_skb(skb); | ||
| 58 | goto out; | ||
| 59 | } | ||
| 60 | |||
| 56 | if (br->dev->flags & IFF_PROMISC) { | 61 | if (br->dev->flags & IFF_PROMISC) { |
| 57 | struct sk_buff *skb2; | 62 | struct sk_buff *skb2; |
| 58 | 63 | ||
| @@ -107,9 +112,6 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) | |||
| 107 | if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) | 112 | if (!is_valid_ether_addr(eth_hdr(skb)->h_source)) |
| 108 | goto err; | 113 | goto err; |
| 109 | 114 | ||
| 110 | if (p->state == BR_STATE_LEARNING) | ||
| 111 | br_fdb_update(p->br, p, eth_hdr(skb)->h_source); | ||
| 112 | |||
| 113 | if (p->br->stp_enabled && | 115 | if (p->br->stp_enabled && |
| 114 | !memcmp(dest, bridge_ula, 5) && | 116 | !memcmp(dest, bridge_ula, 5) && |
| 115 | !(dest[5] & 0xF0)) { | 117 | !(dest[5] & 0xF0)) { |
| @@ -118,9 +120,10 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) | |||
| 118 | NULL, br_stp_handle_bpdu); | 120 | NULL, br_stp_handle_bpdu); |
| 119 | return 1; | 121 | return 1; |
| 120 | } | 122 | } |
| 123 | goto err; | ||
| 121 | } | 124 | } |
| 122 | 125 | ||
| 123 | else if (p->state == BR_STATE_FORWARDING) { | 126 | if (p->state == BR_STATE_FORWARDING || p->state == BR_STATE_LEARNING) { |
| 124 | if (br_should_route_hook) { | 127 | if (br_should_route_hook) { |
| 125 | if (br_should_route_hook(pskb)) | 128 | if (br_should_route_hook(pskb)) |
| 126 | return 0; | 129 | return 0; |
