]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/tcp.c
[SK_BUFF]: Introduce skb_transport_header(skb)
[net-next-2.6.git] / net / ipv4 / tcp.c
index f832f3c33ab1d89a125406d45dac1039f20f9d62..2b214cc3724cc0a958189140d00f2a479dba371e 100644 (file)
@@ -2219,8 +2219,9 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
                th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
                                       (__force u32)delta));
                if (skb->ip_summed != CHECKSUM_PARTIAL)
-                       th->check = csum_fold(csum_partial(skb->h.raw, thlen,
-                                                          skb->csum));
+                       th->check =
+                            csum_fold(csum_partial(skb_transport_header(skb),
+                                                   thlen, skb->csum));
 
                seq += len;
                skb = skb->next;
@@ -2230,12 +2231,13 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
                th->cwr = 0;
        } while (skb->next);
 
-       delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len);
+       delta = htonl(oldlen + (skb->tail - skb_transport_header(skb)) +
+                     skb->data_len);
        th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
                                (__force u32)delta));
        if (skb->ip_summed != CHECKSUM_PARTIAL)
-               th->check = csum_fold(csum_partial(skb->h.raw, thlen,
-                                                  skb->csum));
+               th->check = csum_fold(csum_partial(skb_transport_header(skb),
+                                                  thlen, skb->csum));
 
 out:
        return segs;