aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
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;