diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index dadef867a3bb..168f9de906bc 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2162,7 +2162,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) | |||
2162 | struct tcphdr *th; | 2162 | struct tcphdr *th; |
2163 | unsigned thlen; | 2163 | unsigned thlen; |
2164 | unsigned int seq; | 2164 | unsigned int seq; |
2165 | unsigned int delta; | 2165 | __be32 delta; |
2166 | unsigned int oldlen; | 2166 | unsigned int oldlen; |
2167 | unsigned int len; | 2167 | unsigned int len; |
2168 | 2168 | ||
@@ -2215,7 +2215,8 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) | |||
2215 | do { | 2215 | do { |
2216 | th->fin = th->psh = 0; | 2216 | th->fin = th->psh = 0; |
2217 | 2217 | ||
2218 | th->check = ~csum_fold(th->check + delta); | 2218 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + |
2219 | (__force u32)delta)); | ||
2219 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 2220 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
2220 | th->check = csum_fold(csum_partial(skb->h.raw, thlen, | 2221 | th->check = csum_fold(csum_partial(skb->h.raw, thlen, |
2221 | skb->csum)); | 2222 | skb->csum)); |
@@ -2229,7 +2230,8 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) | |||
2229 | } while (skb->next); | 2230 | } while (skb->next); |
2230 | 2231 | ||
2231 | delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len); | 2232 | delta = htonl(oldlen + (skb->tail - skb->h.raw) + skb->data_len); |
2232 | th->check = ~csum_fold(th->check + delta); | 2233 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + |
2234 | (__force u32)delta)); | ||
2233 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 2235 | if (skb->ip_summed != CHECKSUM_PARTIAL) |
2234 | th->check = csum_fold(csum_partial(skb->h.raw, thlen, | 2236 | th->check = csum_fold(csum_partial(skb->h.raw, thlen, |
2235 | skb->csum)); | 2237 | skb->csum)); |