aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 963bda18486f..dcb116dde216 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2886,6 +2886,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb,
2886 unsigned int oldlen; 2886 unsigned int oldlen;
2887 unsigned int mss; 2887 unsigned int mss;
2888 struct sk_buff *gso_skb = skb; 2888 struct sk_buff *gso_skb = skb;
2889 __sum16 newcheck;
2889 2890
2890 if (!pskb_may_pull(skb, sizeof(*th))) 2891 if (!pskb_may_pull(skb, sizeof(*th)))
2891 goto out; 2892 goto out;
@@ -2936,11 +2937,13 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb,
2936 th = tcp_hdr(skb); 2937 th = tcp_hdr(skb);
2937 seq = ntohl(th->seq); 2938 seq = ntohl(th->seq);
2938 2939
2940 newcheck = ~csum_fold((__force __wsum)((__force u32)th->check +
2941 (__force u32)delta));
2942
2939 do { 2943 do {
2940 th->fin = th->psh = 0; 2944 th->fin = th->psh = 0;
2945 th->check = newcheck;
2941 2946
2942 th->check = ~csum_fold((__force __wsum)((__force u32)th->check +
2943 (__force u32)delta));
2944 if (skb->ip_summed != CHECKSUM_PARTIAL) 2947 if (skb->ip_summed != CHECKSUM_PARTIAL)
2945 th->check = 2948 th->check =
2946 csum_fold(csum_partial(skb_transport_header(skb), 2949 csum_fold(csum_partial(skb_transport_header(skb),