batman-adv: NETIF_F_NETNS_LOCAL feature to prevent netns moves
[deliverable/linux.git] / net / batman-adv / soft-interface.c
index dfb4d56120b696bffd870aab9b3cdde364cc32f5..66dd0aac480ae175eed018b7c041de3e0cc1a437 100644 (file)
@@ -385,7 +385,6 @@ end:
  * batadv_interface_rx - receive ethernet frame on local batman-adv interface
  * @soft_iface: local interface which will receive the ethernet frame
  * @skb: ethernet frame for @soft_iface
- * @recv_if: interface on which the batman-adv packet was received
  * @hdr_size: size of already parsed batman-adv header
  * @orig_node: originator from which the batman-adv packet was sent
  *
@@ -400,8 +399,8 @@ end:
  * isolated clients.
  */
 void batadv_interface_rx(struct net_device *soft_iface,
-                        struct sk_buff *skb, struct batadv_hard_iface *recv_if,
-                        int hdr_size, struct batadv_orig_node *orig_node)
+                        struct sk_buff *skb, int hdr_size,
+                        struct batadv_orig_node *orig_node)
 {
        struct batadv_bcast_packet *batadv_bcast_packet;
        struct batadv_priv *bat_priv = netdev_priv(soft_iface);
@@ -414,10 +413,6 @@ void batadv_interface_rx(struct net_device *soft_iface,
        batadv_bcast_packet = (struct batadv_bcast_packet *)skb->data;
        is_bcast = (batadv_bcast_packet->packet_type == BATADV_BCAST);
 
-       /* check if enough space is available for pulling, and pull */
-       if (!pskb_may_pull(skb, hdr_size))
-               goto dropped;
-
        skb_pull_rcsum(skb, hdr_size);
        skb_reset_mac_header(skb);
 
@@ -977,7 +972,7 @@ static void batadv_softif_init_early(struct net_device *dev)
 
        dev->netdev_ops = &batadv_netdev_ops;
        dev->destructor = batadv_softif_free;
-       dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
+       dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_NETNS_LOCAL;
        dev->priv_flags |= IFF_NO_QUEUE;
 
        /* can't call min_mtu, because the needed variables
This page took 0.036931 seconds and 5 git commands to generate.