From 31366efe23916e29166ba7615ca0fd99f72c5e1d Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 29 Oct 2010 12:14:54 +0000 Subject: [PATCH] --- yaml --- r: 224155 b: refs/heads/master c: c8d5bcd1aff89199cde4bd82c5c40fb704c8bba4 h: refs/heads/master i: 224153: 6b2d66065ea8aaa6426841fece57811a69b638a5 224151: 592f768eb7a05357f88020a1d0a8b719d18aa17e v: v3 --- [refs] | 2 +- trunk/net/core/dev.c | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index a6bcc675d639..a5b6bdc27e92 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e1e78db628b33c657944865e3bca01ee59cc5b80 +refs/heads/master: c8d5bcd1aff89199cde4bd82c5c40fb704c8bba4 diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index 0b403d503311..368930a988e3 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -1794,16 +1794,18 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features) struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT); struct packet_type *ptype; __be16 type = skb->protocol; + int vlan_depth = ETH_HLEN; int err; - if (type == htons(ETH_P_8021Q)) { - struct vlan_ethhdr *veh; + while (type == htons(ETH_P_8021Q)) { + struct vlan_hdr *vh; - if (unlikely(!pskb_may_pull(skb, VLAN_ETH_HLEN))) + if (unlikely(!pskb_may_pull(skb, vlan_depth + VLAN_HLEN))) return ERR_PTR(-EINVAL); - veh = (struct vlan_ethhdr *)skb->data; - type = veh->h_vlan_encapsulated_proto; + vh = (struct vlan_hdr *)(skb->data + vlan_depth); + type = vh->h_vlan_encapsulated_proto; + vlan_depth += VLAN_HLEN; } skb_reset_mac_header(skb);