aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 21:04:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:31 -0400
commit9c70220b73908f64792422a2c39c593c4792f2c5 (patch)
tree2090ea10aaa2714a5e095bae8cc02e743c378a3a /net/ipv4/tcp.c
parenta27ef749e7be3b06fb58df53d94eb97a21f18707 (diff)
[SK_BUFF]: Introduce skb_transport_header(skb)
For the places where we need a pointer to the transport header, it is still legal to touch skb->h.raw directly if just adding to, subtracting from or setting it to another layer header. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index f832f3c33ab1..2b214cc3724c 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2219,8 +2219,9 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2219 th->check = ~csum_fold((__force __wsum)((__force u32)th->check + 2219 th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
2220 (__force u32)delta)); 2220 (__force u32)delta));
2221 if (skb->ip_summed != CHECKSUM_PARTIAL) 2221 if (skb->ip_summed != CHECKSUM_PARTIAL)
2222 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2222 th->check =
2223 skb->csum)); 2223 csum_fold(csum_partial(skb_transport_header(skb),
2224 thlen, skb->csum));
2224 2225
2225 seq += len; 2226 seq += len;
2226 skb = skb->next; 2227 skb = skb->next;
@@ -2230,12 +2231,13 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2230 th->cwr = 0; 2231 th->cwr = 0;
2231 } while (skb->next); 2232 } while (skb->next);
2232 2233
2233 delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len); 2234 delta = htonl(oldlen + (skb->tail - skb_transport_header(skb)) +
2235 skb->data_len);
2234 th->check = ~csum_fold((__force __wsum)((__force u32)th->check + 2236 th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
2235 (__force u32)delta)); 2237 (__force u32)delta));
2236 if (skb->ip_summed != CHECKSUM_PARTIAL) 2238 if (skb->ip_summed != CHECKSUM_PARTIAL)
2237 th->check = csum_fold(csum_partial(skb->h.raw, thlen, 2239 th->check = csum_fold(csum_partial(skb_transport_header(skb),
2238 skb->csum)); 2240 thlen, skb->csum));
2239 2241
2240out: 2242out:
2241 return segs; 2243 return segs;