Skip to content

Commit

Permalink
bridge: stp: ensure mac header is set
Browse files Browse the repository at this point in the history
commit bf9ae53
(llc: use dev_hard_header) removed the
skb_reset_mac_header call from llc_mac_hdr_init.

This seems fine itself, but br_send_bpdu() invokes ebtables LOCAL_OUT.

We oops in ebt_basic_match() because it assumes eth_hdr(skb) returns
a meaningful result.

Cc: acme@ghostprotocols.net
References: https://bugzilla.kernel.org/show_bug.cgi?id=24532
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Westphal authored and David S. Miller committed Jan 3, 2011
1 parent 9d89081 commit e6f2612
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/bridge/br_stp_bpdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ static void br_send_bpdu(struct net_bridge_port *p,

llc_mac_hdr_init(skb, p->dev->dev_addr, p->br->group_addr);

skb_reset_mac_header(skb);

NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
dev_queue_xmit);
}
Expand Down

0 comments on commit e6f2612

Please sign in to comment.