summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_3ad.c
diff options
context:
space:
mode:
authorMahesh Bandewar <maheshb@google.com>2015-02-24 04:50:10 +0300
committerDavid S. Miller <davem@davemloft.net>2015-02-25 00:05:47 +0300
commitbb54e58929f3ce9fe4da719ff2f3264f14214b3a (patch)
tree764c5e10ec7230d3c4ea036526100b377942e67c /drivers/net/bonding/bond_3ad.c
parent2a12d6cf751ff4a26f4054670d4f19ff315ed3b0 (diff)
downloadlinux-bb54e58929f3ce9fe4da719ff2f3264f14214b3a.tar.xz
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>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r--drivers/net/bonding/bond_3ad.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index cfc4a9c1000a..9b436696b95e 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2485,6 +2485,9 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond,
if (skb->protocol != PKT_TYPE_LACPDU)
return RX_HANDLER_ANOTHER;
+ if (!MAC_ADDRESS_EQUAL(eth_hdr(skb)->h_dest, lacpdu_mcast_addr))
+ return RX_HANDLER_ANOTHER;
+
lacpdu = skb_header_pointer(skb, 0, sizeof(_lacpdu), &_lacpdu);
if (!lacpdu)
return RX_HANDLER_ANOTHER;