Skip to content

Commit bb54e58

Browse files
Mahesh Bandewardavem330
authored andcommitted
bonding: Verify RX LACPDU has proper dest mac-addr
The 802.1AX standard states: "The DA in LACPDUs is the Slow_Protocols_Multicast address." This patch enforces that and drops LACPDUs with destination MAC addresses other than Slow_Protocols_Multicast address Signed-off-by: Mahesh Bandewar <maheshb@google.com> Reviewed-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 2a12d6c commit bb54e58

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/net/bonding/bond_3ad.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2485,6 +2485,9 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
24852485
if (skb->protocol != PKT_TYPE_LACPDU)
24862486
return RX_HANDLER_ANOTHER;
24872487

2488+
if (!MAC_ADDRESS_EQUAL(eth_hdr(skb)->h_dest, lacpdu_mcast_addr))
2489+
return RX_HANDLER_ANOTHER;
2490+
24882491
lacpdu = skb_header_pointer(skb, 0, sizeof(_lacpdu), &_lacpdu);
24892492
if (!lacpdu)
24902493
return RX_HANDLER_ANOTHER;

0 commit comments

Comments
 (0)