Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224155
b: refs/heads/master
c: c8d5bcd
h: refs/heads/master
i:
  224153: 6b2d660
  224151: 592f768
v: v3
  • Loading branch information
Jesse Gross authored and David S. Miller committed Nov 15, 2010
1 parent e386e2d commit 31366ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1e78db628b33c657944865e3bca01ee59cc5b80
refs/heads/master: c8d5bcd1aff89199cde4bd82c5c40fb704c8bba4
12 changes: 7 additions & 5 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 31366ef

Please sign in to comment.