aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/exthdrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r--net/ipv6/exthdrs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index ffcda45e2c1e..47122728212a 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -461,11 +461,10 @@ static int ipv6_hop_jumbo(struct sk_buff *skb, int optoff)
461 IP6_INC_STATS_BH(IPSTATS_MIB_INTRUNCATEDPKTS); 461 IP6_INC_STATS_BH(IPSTATS_MIB_INTRUNCATEDPKTS);
462 goto drop; 462 goto drop;
463 } 463 }
464 if (pkt_len + sizeof(struct ipv6hdr) < skb->len) { 464
465 __pskb_trim(skb, pkt_len + sizeof(struct ipv6hdr)); 465 if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr)))
466 if (skb->ip_summed == CHECKSUM_HW) 466 goto drop;
467 skb->ip_summed = CHECKSUM_NONE; 467
468 }
469 return 1; 468 return 1;
470 469
471drop: 470drop: