aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/gre_offload.c7
-rw-r--r--net/ipv4/udp_offload.c5
2 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index d1bd16937d93..a4d7965fb880 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -172,12 +172,9 @@ static struct sk_buff **gre_gro_receive(struct sk_buff **head,
172 } 172 }
173 173
174 /* Don't bother verifying checksum if we're going to flush anyway. */ 174 /* Don't bother verifying checksum if we're going to flush anyway. */
175 if (greh->flags & GRE_CSUM) { 175 if ((greh->flags & GRE_CSUM) && !NAPI_GRO_CB(skb)->flush &&
176 if (!NAPI_GRO_CB(skb)->flush && 176 skb_gro_checksum_simple_validate(skb))
177 skb_gro_checksum_simple_validate(skb))
178 goto out_unlock; 177 goto out_unlock;
179 NAPI_GRO_CB(skb)->encapsulation++;
180 }
181 178
182 flush = 0; 179 flush = 0;
183 180
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 8ed460e3753c..a6adff98382a 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -238,12 +238,13 @@ struct sk_buff **udp_gro_receive(struct sk_buff **head, struct sk_buff *skb,
238 int flush = 1; 238 int flush = 1;
239 239
240 if (NAPI_GRO_CB(skb)->udp_mark || 240 if (NAPI_GRO_CB(skb)->udp_mark ||
241 (!skb->encapsulation && !NAPI_GRO_CB(skb)->csum_valid)) 241 (skb->ip_summed != CHECKSUM_PARTIAL &&
242 NAPI_GRO_CB(skb)->csum_cnt == 0 &&
243 !NAPI_GRO_CB(skb)->csum_valid))
242 goto out; 244 goto out;
243 245
244 /* mark that this skb passed once through the udp gro layer */ 246 /* mark that this skb passed once through the udp gro layer */
245 NAPI_GRO_CB(skb)->udp_mark = 1; 247 NAPI_GRO_CB(skb)->udp_mark = 1;
246 NAPI_GRO_CB(skb)->encapsulation++;
247 248
248 rcu_read_lock(); 249 rcu_read_lock();
249 uo_priv = rcu_dereference(udp_offload_base); 250 uo_priv = rcu_dereference(udp_offload_base);