Skip to content

Commit 35e00da

Browse files
edumazetdavem330
authored andcommitted
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 3b11775 ("tcp: do not mangle skb->cb[] in tcp_make_synack()"), noticing I did not clear skb->csum. Signed-off-by: Eric Dumazet <[email protected]> Reported-by: Neal Cardwell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d0f3684 commit 35e00da

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

net/ipv4/tcp_output.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,6 @@ static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb,
381381
static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags)
382382
{
383383
skb->ip_summed = CHECKSUM_PARTIAL;
384-
skb->csum = 0;
385384

386385
TCP_SKB_CB(skb)->tcp_flags = flags;
387386
TCP_SKB_CB(skb)->sacked = 0;

0 commit comments

Comments
 (0)