]> err.no Git - linux-2.6/commitdiff
[SK_BUFF]: Use the helpers to get the layer header pointer
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 16 Mar 2007 20:19:57 +0000 (17:19 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:18 +0000 (22:26 -0700)
Some more cases...

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/igmp.c
net/ipv4/ip_output.c
net/ipv6/exthdrs.c
net/ipv6/netfilter/nf_conntrack_reasm.c

index b0efd279ddb486b69eb73f4054d34839921a1a89..4695ada1d9b171e70220de1f6d0ca0d2446734ef 100644 (file)
@@ -348,7 +348,7 @@ static int igmpv3_sendpack(struct sk_buff *skb)
 {
        struct iphdr *pip = ip_hdr(skb);
        struct igmphdr *pig = igmp_hdr(skb);
-       const int iplen = skb->tail - skb->nh.raw;
+       const int iplen = skb->tail - skb_network_header(skb);
        const int igmplen = skb->tail - skb_transport_header(skb);
 
        pip->tot_len = htons(iplen);
index 11ab100d6c6cf96d95f7f937086a19ce4cd7fb59..11a6ac756f8cb227dd4ac449ddfd45c2dc9a124f 100644 (file)
@@ -601,7 +601,7 @@ slow_path:
                /*
                 *      Copy a block of the IP datagram.
                 */
-               if (skb_copy_bits(skb, ptr, skb2->h.raw, len))
+               if (skb_copy_bits(skb, ptr, skb_transport_header(skb2), len))
                        BUG();
                left -= len;
 
index f25ee773f52eb14b0d9cb6b1b3d0bf34660d1a5c..f763409ea740860ec4d4847273423d3e695ed311 100644 (file)
@@ -506,7 +506,7 @@ looped_back:
                kfree_skb(skb);
                *skbp = skb = skb2;
                opt = IP6CB(skb2);
-               hdr = (struct ipv6_rt_hdr *) skb2->h.raw;
+               hdr = (struct ipv6_rt_hdr *)skb_transport_header(skb2);
        }
 
        if (skb->ip_summed == CHECKSUM_COMPLETE)
index 015950522c8bb01750ebfd789cfb9ca29fbb998d..84ce5b3c4b21f2931d038698d16870abc8520186 100644 (file)
@@ -627,7 +627,7 @@ nf_ct_frag6_reasm(struct nf_ct_frag6_queue *fq, struct net_device *dev)
 
        /* We have to remove fragment header from datagram and to relocate
         * header in order to calculate ICV correctly. */
-       skb_network_header(head)[fq->nhoffset] = head->h.raw[0];
+       skb_network_header(head)[fq->nhoffset] = skb_transport_header(head)[0];
        memmove(head->head + sizeof(struct frag_hdr), head->head,
                (head->data - head->head) - sizeof(struct frag_hdr));
        head->mac.raw += sizeof(struct frag_hdr);
@@ -787,7 +787,7 @@ struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb)
 
        skb_set_transport_header(clone, fhoff);
        hdr = ipv6_hdr(clone);
-       fhdr = (struct frag_hdr *)clone->h.raw;
+       fhdr = (struct frag_hdr *)skb_transport_header(clone);
 
        if (!(fhdr->frag_off & htons(0xFFF9))) {
                DEBUGP("Invalid fragment offset\n");