netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bonding: fix bridged bonds in 802.3ad mode
@ 2011-04-21 18:47 Jiri Bohac
  2011-04-21 19:08 ` Ben Hutchings
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Bohac @ 2011-04-21 18:47 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, Jay Vosburgh, Andy Gospodarek,
	Benjamin Poirier

802.3ad bonding inside a bridge is broken again. Originally fixed by
43aa1920117801fe9ae3d1fad886b62511e09bee, the bug was re-introduced by
1e253c3b8a1aeed51eef6fc366812f219b97de65.

LACP frames must not have their skb->dev changed by the bridging hook.

Signed-off-by: Jiri Bohac <jbohac@suse.cz>

--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1514,6 +1514,11 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
 		memcpy(eth_hdr(skb)->h_dest, bond->dev->dev_addr, ETH_ALEN);
 	}
 
+	/* prevent bridging code from mangling and forwarding LACP frames */
+	if (bond->params.mode == BOND_MODE_8023AD &&
+	    skb->protocol == htons(ETH_P_SLOW))
+		return RX_HANDLER_PASS;
+
 	return RX_HANDLER_ANOTHER;
 }
 
-- 
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, SUSE CZ


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-22 15:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21 18:47 [PATCH] bonding: fix bridged bonds in 802.3ad mode Jiri Bohac
2011-04-21 19:08 ` Ben Hutchings
2011-04-21 19:27   ` Jiri Bohac
2011-04-21 20:43   ` Benjamin Poirier
2011-04-21 21:08     ` Stephen Hemminger
2011-04-22  4:19     ` David Miller
2011-04-22 15:27       ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).