]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/core/dev.c
[SK_BUFF]: Introduce skb_transport_header(skb)
[net-next-2.6.git] / net / core / dev.c
index f7f7e5687e462a459a8395d2ed5f273aa0eaee74..30fcc7f9d4edde76a685fc9d0f4ef5e1628a9ca0 100644 (file)
@@ -1175,12 +1175,12 @@ int skb_checksum_help(struct sk_buff *skb)
        BUG_ON(offset > (int)skb->len);
        csum = skb_checksum(skb, offset, skb->len-offset, 0);
 
-       offset = skb->tail - skb->h.raw;
+       offset = skb->tail - skb_transport_header(skb);
        BUG_ON(offset <= 0);
        BUG_ON(skb->csum_offset + 2 > offset);
 
-       *(__sum16*)(skb->h.raw + skb->csum_offset) = csum_fold(csum);
-
+       *(__sum16 *)(skb_transport_header(skb) +
+                    skb->csum_offset) = csum_fold(csum);
 out_set_summed:
        skb->ip_summed = CHECKSUM_NONE;
 out: