diff options
Diffstat (limited to 'net/ipv4/gre_offload.c')
-rw-r--r-- | net/ipv4/gre_offload.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c index a77729503071..ccda09628de7 100644 --- a/net/ipv4/gre_offload.c +++ b/net/ipv4/gre_offload.c | |||
@@ -55,13 +55,13 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb, | |||
55 | if (csum) | 55 | if (csum) |
56 | skb->encap_hdr_csum = 1; | 56 | skb->encap_hdr_csum = 1; |
57 | 57 | ||
58 | if (unlikely(!pskb_may_pull(skb, ghl))) | ||
59 | goto out; | ||
60 | |||
61 | /* setup inner skb. */ | 58 | /* setup inner skb. */ |
62 | skb->protocol = greh->protocol; | 59 | skb->protocol = greh->protocol; |
63 | skb->encapsulation = 0; | 60 | skb->encapsulation = 0; |
64 | 61 | ||
62 | if (unlikely(!pskb_may_pull(skb, ghl))) | ||
63 | goto out; | ||
64 | |||
65 | __skb_pull(skb, ghl); | 65 | __skb_pull(skb, ghl); |
66 | skb_reset_mac_header(skb); | 66 | skb_reset_mac_header(skb); |
67 | skb_set_network_header(skb, skb_inner_network_offset(skb)); | 67 | skb_set_network_header(skb, skb_inner_network_offset(skb)); |