diff options
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r-- | net/ipv6/reassembly.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index f85e49acb91a..156a37fe3ff3 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
@@ -430,8 +430,8 @@ static void ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb, | |||
430 | goto err; | 430 | goto err; |
431 | 431 | ||
432 | offset = ntohs(fhdr->frag_off) & ~0x7; | 432 | offset = ntohs(fhdr->frag_off) & ~0x7; |
433 | end = offset + (ntohs(skb->nh.ipv6h->payload_len) - | 433 | end = offset + (ntohs(ipv6_hdr(skb)->payload_len) - |
434 | ((u8 *) (fhdr + 1) - (u8 *) (skb->nh.ipv6h + 1))); | 434 | ((u8 *)(fhdr + 1) - (u8 *)(ipv6_hdr(skb) + 1))); |
435 | 435 | ||
436 | if ((unsigned int)end > IPV6_MAXPLEN) { | 436 | if ((unsigned int)end > IPV6_MAXPLEN) { |
437 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), | 437 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), |
@@ -671,7 +671,7 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff **skb_in, | |||
671 | head->next = NULL; | 671 | head->next = NULL; |
672 | head->dev = dev; | 672 | head->dev = dev; |
673 | head->tstamp = fq->stamp; | 673 | head->tstamp = fq->stamp; |
674 | head->nh.ipv6h->payload_len = htons(payload_len); | 674 | ipv6_hdr(head)->payload_len = htons(payload_len); |
675 | IP6CB(head)->nhoff = nhoff; | 675 | IP6CB(head)->nhoff = nhoff; |
676 | 676 | ||
677 | *skb_in = head; | 677 | *skb_in = head; |
@@ -708,9 +708,7 @@ static int ipv6_frag_rcv(struct sk_buff **skbp) | |||
708 | struct net_device *dev = skb->dev; | 708 | struct net_device *dev = skb->dev; |
709 | struct frag_hdr *fhdr; | 709 | struct frag_hdr *fhdr; |
710 | struct frag_queue *fq; | 710 | struct frag_queue *fq; |
711 | struct ipv6hdr *hdr; | 711 | struct ipv6hdr *hdr = ipv6_hdr(skb); |
712 | |||
713 | hdr = skb->nh.ipv6h; | ||
714 | 712 | ||
715 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMREQDS); | 713 | IP6_INC_STATS_BH(ip6_dst_idev(skb->dst), IPSTATS_MIB_REASMREQDS); |
716 | 714 | ||
@@ -726,7 +724,7 @@ static int ipv6_frag_rcv(struct sk_buff **skbp) | |||
726 | return -1; | 724 | return -1; |
727 | } | 725 | } |
728 | 726 | ||
729 | hdr = skb->nh.ipv6h; | 727 | hdr = ipv6_hdr(skb); |
730 | fhdr = (struct frag_hdr *)skb->h.raw; | 728 | fhdr = (struct frag_hdr *)skb->h.raw; |
731 | 729 | ||
732 | if (!(fhdr->frag_off & htons(0xFFF9))) { | 730 | if (!(fhdr->frag_off & htons(0xFFF9))) { |