diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/exthdrs.c | 9 | ||||
-rw-r--r-- | net/ipv6/reassembly.c | 9 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 |
3 files changed, 8 insertions, 12 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 | ||
471 | drop: | 470 | drop: |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index 9d9e04344c77..e4fe9ee484dd 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -479,12 +479,9 @@ static void ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb, | |||
479 | /* Point into the IP datagram 'data' part. */ | 479 | /* Point into the IP datagram 'data' part. */ |
480 | if (!pskb_pull(skb, (u8 *) (fhdr + 1) - skb->data)) | 480 | if (!pskb_pull(skb, (u8 *) (fhdr + 1) - skb->data)) |
481 | goto err; | 481 | goto err; |
482 | if (end-offset < skb->len) { | 482 | |
483 | if (pskb_trim(skb, end - offset)) | 483 | if (pskb_trim_rcsum(skb, end - offset)) |
484 | goto err; | 484 | goto err; |
485 | if (skb->ip_summed != CHECKSUM_UNNECESSARY) | ||
486 | skb->ip_summed = CHECKSUM_NONE; | ||
487 | } | ||
488 | 485 | ||
489 | /* Find out which fragments are in front and at the back of us | 486 | /* Find out which fragments are in front and at the back of us |
490 | * in the chain of fragments so far. We must know where to put | 487 | * in the chain of fragments so far. We must know where to put |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index dbd18a9d1669..f5ae14810a70 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -483,7 +483,7 @@ static int udpv6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) | |||
483 | } | 483 | } |
484 | 484 | ||
485 | if (ulen < skb->len) { | 485 | if (ulen < skb->len) { |
486 | if (__pskb_trim(skb, ulen)) | 486 | if (pskb_trim_rcsum(skb, ulen)) |
487 | goto discard; | 487 | goto discard; |
488 | saddr = &skb->nh.ipv6h->saddr; | 488 | saddr = &skb->nh.ipv6h->saddr; |
489 | daddr = &skb->nh.ipv6h->daddr; | 489 | daddr = &skb->nh.ipv6h->daddr; |