aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r--net/ipv6/raw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 5f26645195dc..9b2bcde73f19 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -361,7 +361,7 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
361 skb->ip_summed = CHECKSUM_UNNECESSARY; 361 skb->ip_summed = CHECKSUM_UNNECESSARY;
362 362
363 if (skb->ip_summed == CHECKSUM_COMPLETE) { 363 if (skb->ip_summed == CHECKSUM_COMPLETE) {
364 skb_postpull_rcsum(skb, skb->nh.raw, 364 skb_postpull_rcsum(skb, skb_network_header(skb),
365 skb->h.raw - skb->nh.raw); 365 skb->h.raw - skb->nh.raw);
366 if (!csum_ipv6_magic(&skb->nh.ipv6h->saddr, 366 if (!csum_ipv6_magic(&skb->nh.ipv6h->saddr,
367 &skb->nh.ipv6h->daddr, 367 &skb->nh.ipv6h->daddr,
@@ -488,7 +488,8 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
488 goto out; 488 goto out;
489 489
490 offset = rp->offset; 490 offset = rp->offset;
491 total_len = inet_sk(sk)->cork.length - (skb->nh.raw - skb->data); 491 total_len = inet_sk(sk)->cork.length - (skb_network_header(skb) -
492 skb->data);
492 if (offset >= total_len - 1) { 493 if (offset >= total_len - 1) {
493 err = -EINVAL; 494 err = -EINVAL;
494 ip6_flush_pending_frames(sk); 495 ip6_flush_pending_frames(sk);