aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/reassembly.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 20:54:47 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:14 -0400
commit0660e03f6b18f19b6bbafe7583265a51b90daf36 (patch)
tree82cc819ead5ab7858ba211ee8719a3e6d2bb984f /net/ipv6/reassembly.c
parentd0a92be05ed4aea7d35c2b257e3f9173565fe4eb (diff)
[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
Now the skb->nh union has just one member, .raw, i.e. it is just like the skb->mac union, strange, no? I'm just leaving it like that till the transport layer is done with, when we'll rename skb->mac.raw to skb->mac_header (or ->mac_header_offset?), ditto for ->{h,nh}. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/reassembly.c')
-rw-r--r--net/ipv6/reassembly.c12
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))) {