diff options
author | Eric Dumazet <edumazet@google.com> | 2017-11-03 09:18:59 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-05 08:14:54 -0500 |
commit | 35e00da36cf42d54270ce25110ce304d12b18586 (patch) | |
tree | 6bd07d160416b06eb850310dea5819c69141ff79 /net/ipv4/tcp_output.c | |
parent | d0f36847016276920d860d5c089934ff3fea7e30 (diff) |
tcp: do not clear again skb->csum in tcp_init_nondata_skb()
tcp_init_nondata_skb() is fed with freshly allocated skbs.
They already have a cleared csum field, no need to clear it again.
This is based on Neal review on commit 3b11775033dc ("tcp: do not mangle
skb->cb[] in tcp_make_synack()"), noticing I did not clear skb->csum.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index b98b2f7f07e7..a9d917e4dad5 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -381,7 +381,6 @@ static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb, | |||
381 | static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags) | 381 | static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags) |
382 | { | 382 | { |
383 | skb->ip_summed = CHECKSUM_PARTIAL; | 383 | skb->ip_summed = CHECKSUM_PARTIAL; |
384 | skb->csum = 0; | ||
385 | 384 | ||
386 | TCP_SKB_CB(skb)->tcp_flags = flags; | 385 | TCP_SKB_CB(skb)->tcp_flags = flags; |
387 | TCP_SKB_CB(skb)->sacked = 0; | 386 | TCP_SKB_CB(skb)->sacked = 0; |