summaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-08-06 17:04:22 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-11-08 19:02:35 +0100
commit92eef520d77d106d9ea06b17294c5079edefe95d (patch)
tree0df79f8290008f0d36b6186a66e921fd88dcdd60 /net/batman-adv
parent9f75c8e1c8cc868645f34152df5ffd3fe97d1620 (diff)
downloadlinux-92eef520d77d106d9ea06b17294c5079edefe95d.tar.bz2
batman-adv: Disallow zero and mcast src address for mgmt frames
The routing check for management frames is validating the source mac address in the outer ethernet header. It rejects every source mac address which is a broadcast address. But it also has to reject the zero-mac address and multicast mac addresses. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/routing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index c02897ba9b8b..4f034df09a5a 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -196,8 +196,8 @@ bool batadv_check_management_packet(struct sk_buff *skb,
if (!is_broadcast_ether_addr(ethhdr->h_dest))
return false;
- /* packet with broadcast sender address */
- if (is_broadcast_ether_addr(ethhdr->h_source))
+ /* packet with invalid sender address */
+ if (!is_valid_ether_addr(ethhdr->h_source))
return false;
/* create a copy of the skb, if needed, to modify it. */