|
@@ -114,8 +114,11 @@ EXPORT_SYMBOL(vlan_dev_vlan_proto);
|
|
|
|
|
|
static struct sk_buff *vlan_reorder_header(struct sk_buff *skb)
|
|
static struct sk_buff *vlan_reorder_header(struct sk_buff *skb)
|
|
{
|
|
{
|
|
- if (skb_cow(skb, skb_headroom(skb)) < 0)
|
|
|
|
|
|
+ if (skb_cow(skb, skb_headroom(skb)) < 0) {
|
|
|
|
+ kfree_skb(skb);
|
|
return NULL;
|
|
return NULL;
|
|
|
|
+ }
|
|
|
|
+
|
|
memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN);
|
|
memmove(skb->data - ETH_HLEN, skb->data - VLAN_ETH_HLEN, 2 * ETH_ALEN);
|
|
skb->mac_header += VLAN_HLEN;
|
|
skb->mac_header += VLAN_HLEN;
|
|
return skb;
|
|
return skb;
|