diff options
Diffstat (limited to 'net/ipv4/tcp_offload.c')
-rw-r--r-- | net/ipv4/tcp_offload.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/tcp_offload.c b/net/ipv4/tcp_offload.c index 9864a2dbadce..773083b7f1e9 100644 --- a/net/ipv4/tcp_offload.c +++ b/net/ipv4/tcp_offload.c | |||
@@ -135,7 +135,9 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
135 | th->fin = th->psh = 0; | 135 | th->fin = th->psh = 0; |
136 | th->check = newcheck; | 136 | th->check = newcheck; |
137 | 137 | ||
138 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 138 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
139 | gso_reset_checksum(skb, ~th->check); | ||
140 | else | ||
139 | th->check = gso_make_checksum(skb, ~th->check); | 141 | th->check = gso_make_checksum(skb, ~th->check); |
140 | 142 | ||
141 | seq += mss; | 143 | seq += mss; |
@@ -169,7 +171,9 @@ struct sk_buff *tcp_gso_segment(struct sk_buff *skb, | |||
169 | skb->data_len); | 171 | skb->data_len); |
170 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + | 172 | th->check = ~csum_fold((__force __wsum)((__force u32)th->check + |
171 | (__force u32)delta)); | 173 | (__force u32)delta)); |
172 | if (skb->ip_summed != CHECKSUM_PARTIAL) | 174 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
175 | gso_reset_checksum(skb, ~th->check); | ||
176 | else | ||
173 | th->check = gso_make_checksum(skb, ~th->check); | 177 | th->check = gso_make_checksum(skb, ~th->check); |
174 | out: | 178 | out: |
175 | return segs; | 179 | return segs; |