Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-block.git] / net / batman-adv / soft-interface.c
index 9e4bb61301ec1e155b9013585c5a02dc371bdc26..109ea2aae96cde266aef1123bb73a3fa7d219e79 100644 (file)
@@ -267,8 +267,12 @@ void batadv_interface_rx(struct net_device *soft_iface,
        struct batadv_priv *bat_priv = netdev_priv(soft_iface);
        struct ethhdr *ethhdr;
        struct vlan_ethhdr *vhdr;
+       struct batadv_header *batadv_header = (struct batadv_header *)skb->data;
        short vid __maybe_unused = -1;
        __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN);
+       bool is_bcast;
+
+       is_bcast = (batadv_header->packet_type == BATADV_BCAST);
 
        /* check if enough space is available for pulling, and pull */
        if (!pskb_may_pull(skb, hdr_size))
@@ -315,7 +319,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
        /* Let the bridge loop avoidance check the packet. If will
         * not handle it, we can safely push it up.
         */
-       if (batadv_bla_rx(bat_priv, skb, vid))
+       if (batadv_bla_rx(bat_priv, skb, vid, is_bcast))
                goto out;
 
        netif_rx(skb);