]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
vlan: Update skb->mac_header in __vlan_put_tag().
authorJarek Poplawski <jarkao2@gmail.com>
Thu, 19 Feb 2009 07:31:11 +0000 (23:31 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Feb 2009 07:31:11 +0000 (23:31 -0800)
After moving mac addresses in __vlan_put_tag() skb->mac_header needs
to be updated.

Reported-by: Karl Hiramoto <karl@hiramoto.org>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h

index f8ff918c208f047f86b42894dfb3a6c211db2238..e1ff5b14310e817197fbf77c5af9522f2b862f6b 100644 (file)
@@ -210,6 +210,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
 
        /* Move the mac addresses to the beginning of the new header. */
        memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN);
+       skb->mac_header -= VLAN_HLEN;
 
        /* first, the ethernet type */
        veth->h_vlan_proto = htons(ETH_P_8021Q);