Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15553
b: refs/heads/master
c: 0e5eaba
h: refs/heads/master
i:
  15551: e7d900b
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Jan 3, 2006
1 parent 912484f commit 4a86b3c
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 4433f420e57afae0ab308b1e2b979f09c86bc115
refs/heads/master: 0e5eabac4995e128f06b90df64b93604625de6de
11 changes: 7 additions & 4 deletions trunk/net/bridge/br_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ int br_handle_frame_finish(struct sk_buff *skb)
/* insert into forwarding database after filtering to avoid spoofing */
br_fdb_update(p->br, p, eth_hdr(skb)->h_source);

if (p->state == BR_STATE_LEARNING) {
kfree_skb(skb);
goto out;
}

if (br->dev->flags & IFF_PROMISC) {
struct sk_buff *skb2;

Expand Down Expand Up @@ -107,9 +112,6 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb)
if (!is_valid_ether_addr(eth_hdr(skb)->h_source))
goto err;

if (p->state == BR_STATE_LEARNING)
br_fdb_update(p->br, p, eth_hdr(skb)->h_source);

if (p->br->stp_enabled &&
!memcmp(dest, bridge_ula, 5) &&
!(dest[5] & 0xF0)) {
Expand All @@ -118,9 +120,10 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb)
NULL, br_stp_handle_bpdu);
return 1;
}
goto err;
}

else if (p->state == BR_STATE_FORWARDING) {
if (p->state == BR_STATE_FORWARDING || p->state == BR_STATE_LEARNING) {
if (br_should_route_hook) {
if (br_should_route_hook(pskb))
return 0;
Expand Down

0 comments on commit 4a86b3c

Please sign in to comment.