aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/netdevice.h9
-rw-r--r--net/ipv6/ip6_offload.c1
2 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 994f7423a74b..9bde9558b596 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2477,14 +2477,19 @@ static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen)
2477 return NAPI_GRO_CB(skb)->frag0_len < hlen; 2477 return NAPI_GRO_CB(skb)->frag0_len < hlen;
2478} 2478}
2479 2479
2480static inline void skb_gro_frag0_invalidate(struct sk_buff *skb)
2481{
2482 NAPI_GRO_CB(skb)->frag0 = NULL;
2483 NAPI_GRO_CB(skb)->frag0_len = 0;
2484}
2485
2480static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, 2486static inline void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen,
2481 unsigned int offset) 2487 unsigned int offset)
2482{ 2488{
2483 if (!pskb_may_pull(skb, hlen)) 2489 if (!pskb_may_pull(skb, hlen))
2484 return NULL; 2490 return NULL;
2485 2491
2486 NAPI_GRO_CB(skb)->frag0 = NULL; 2492 skb_gro_frag0_invalidate(skb);
2487 NAPI_GRO_CB(skb)->frag0_len = 0;
2488 return skb->data + offset; 2493 return skb->data + offset;
2489} 2494}
2490 2495
diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
index 89c59e656f44..fc7b4017ba24 100644
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -191,6 +191,7 @@ static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
191 ops = rcu_dereference(inet6_offloads[proto]); 191 ops = rcu_dereference(inet6_offloads[proto]);
192 if (!ops || !ops->callbacks.gro_receive) { 192 if (!ops || !ops->callbacks.gro_receive) {
193 __pskb_pull(skb, skb_gro_offset(skb)); 193 __pskb_pull(skb, skb_gro_offset(skb));
194 skb_gro_frag0_invalidate(skb);
194 proto = ipv6_gso_pull_exthdrs(skb, proto); 195 proto = ipv6_gso_pull_exthdrs(skb, proto);
195 skb_gro_pull(skb, -skb_transport_offset(skb)); 196 skb_gro_pull(skb, -skb_transport_offset(skb));
196 skb_reset_transport_header(skb); 197 skb_reset_transport_header(skb);