[linux-next] LinuxNextTracking branch, master, updated. next-20161111

batman at open-mesh.org batman at open-mesh.org
Sat Nov 12 00:15:45 CET 2016


The following commit has been merged in the master branch:
commit 9f75c8e1c8cc868645f34152df5ffd3fe97d1620
Author: Sven Eckelmann <sven at narfation.org>
Date:   Sat Aug 6 17:04:21 2016 +0200

    batman-adv: Disallow mcast src address for data frames
    
    The routing checks are validating the source mac address of the outer
    ethernet header. They reject every source mac address which is a broadcast
    address. But they also have to reject any multicast mac addresses.
    
    Signed-off-by: Sven Eckelmann <sven at narfation.org>
    [sw at simonwunderlich.de: fix commit message typo]
    Signed-off-by: Simon Wunderlich <sw at simonwunderlich.de>

diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c
index 105d4fc..c02897b 100644
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -368,8 +368,8 @@ int batadv_recv_icmp_packet(struct sk_buff *skb,
 	if (is_broadcast_ether_addr(ethhdr->h_dest))
 		goto free_skb;
 
-	/* packet with broadcast sender address */
-	if (is_broadcast_ether_addr(ethhdr->h_source))
+	/* packet with broadcast/multicast sender address */
+	if (is_multicast_ether_addr(ethhdr->h_source))
 		goto free_skb;
 
 	/* not for me */
@@ -466,8 +466,8 @@ static int batadv_check_unicast_packet(struct batadv_priv *bat_priv,
 	if (is_broadcast_ether_addr(ethhdr->h_dest))
 		return -EBADR;
 
-	/* packet with broadcast sender address */
-	if (is_broadcast_ether_addr(ethhdr->h_source))
+	/* packet with broadcast/multicast sender address */
+	if (is_multicast_ether_addr(ethhdr->h_source))
 		return -EBADR;
 
 	/* not for me */
@@ -1159,8 +1159,8 @@ int batadv_recv_bcast_packet(struct sk_buff *skb,
 	if (!is_broadcast_ether_addr(ethhdr->h_dest))
 		goto free_skb;
 
-	/* packet with broadcast sender address */
-	if (is_broadcast_ether_addr(ethhdr->h_source))
+	/* packet with broadcast/multicast sender address */
+	if (is_multicast_ether_addr(ethhdr->h_source))
 		goto free_skb;
 
 	/* ignore broadcasts sent by myself */

-- 
LinuxNextTracking


More information about the linux-merge mailing list