提交 92eef520 编写于 作者: S Sven Eckelmann 提交者: Simon Wunderlich

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: NSven Eckelmann <sven@narfation.org>
Signed-off-by: NSimon Wunderlich <sw@simonwunderlich.de>
上级 9f75c8e1
...@@ -196,8 +196,8 @@ bool batadv_check_management_packet(struct sk_buff *skb, ...@@ -196,8 +196,8 @@ bool batadv_check_management_packet(struct sk_buff *skb,
if (!is_broadcast_ether_addr(ethhdr->h_dest)) if (!is_broadcast_ether_addr(ethhdr->h_dest))
return false; return false;
/* packet with broadcast sender address */ /* packet with invalid sender address */
if (is_broadcast_ether_addr(ethhdr->h_source)) if (!is_valid_ether_addr(ethhdr->h_source))
return false; return false;
/* create a copy of the skb, if needed, to modify it. */ /* create a copy of the skb, if needed, to modify it. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部