Skip to contentSkip to conversation

bridge: stp: ensure mac header is set

PATCH In review Florian Westphal 2 participants 2 messages Jan 3, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bridge: stp: ensure mac header is set

commit bf9ae5386bca8836c16e69ab8fdbe46767d7452a
(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: [email protected]
References: https://bugzilla.kernel.org/show_bug.cgi?id=24532

---
 net/bridge/br_stp_bpdu.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
net/bridge/br_stp_bpdu.c +2 -0
index 3d9a55d..289646e 100644
@@ -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);
 }
Signature · 1 line
1.7.2.2
maintainer
#1 lore raw

From: Florian Westphal <[email protected]>
Date: Mon, 3 Jan 2011 15:16:28 +0100

Quoted 4 lines

commit bf9ae5386bca8836c16e69ab8fdbe46767d7452a
(llc: use dev_hard_header) removed the
skb_reset_mac_header call from llc_mac_hdr_init.

Quoted 8 lines

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: [email protected]
References: https://bugzilla.kernel.org/show_bug.cgi?id=24532

Applied and queued up for -stable, thanks Florian.