batman-adv: fix vlan header access
authorAntonio Quartulli <antonio@meshcoding.com>
Mon, 23 Dec 2013 20:43:39 +0000 (21:43 +0100)
committerAntonio Quartulli <antonio@meshcoding.com>
Sat, 28 Dec 2013 13:48:40 +0000 (14:48 +0100)
When batadv_get_vid() is invoked in interface_rx() the
batman-adv header has already been removed, therefore
the header_len argument has to be 0.

Introduced by c018ad3de61a1dc4194879a53e5559e094aa7b1a
("batman-adv: add the VLAN ID attribute to the TT entry")

Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
net/batman-adv/soft-interface.c

index 875a702542c2f54e5a00e718373de898bd26e61c..a8f99d1486c0441e9aa192e81d7522ad451f4bd7 100644 (file)
@@ -351,7 +351,7 @@ void batadv_interface_rx(struct net_device *soft_iface,
         */
        nf_reset(skb);
 
-       vid = batadv_get_vid(skb, hdr_size);
+       vid = batadv_get_vid(skb, 0);
        ethhdr = eth_hdr(skb);
 
        switch (ntohs(ethhdr->h_proto)) {