Skip to content

Commit 8541b21

Browse files
edumazetdavem330
authored andcommitted
tcp: call tcp_drop() from tcp_data_queue_ofo()
In order to be able to give better diagnostics and detect malicious traffic, we need to have better sk->sk_drops tracking. Fixes: 9f5afea ("tcp: use an RB tree for ooo receive queue") Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Soheil Hassas Yeganeh <[email protected]> Acked-by: Yuchung Cheng <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 3d4bf93 commit 8541b21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/ipv4/tcp_input.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4510,7 +4510,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
45104510
/* All the bits are present. Drop. */
45114511
NET_INC_STATS(sock_net(sk),
45124512
LINUX_MIB_TCPOFOMERGE);
4513-
__kfree_skb(skb);
4513+
tcp_drop(sk, skb);
45144514
skb = NULL;
45154515
tcp_dsack_set(sk, seq, end_seq);
45164516
goto add_sack;
@@ -4529,7 +4529,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
45294529
TCP_SKB_CB(skb1)->end_seq);
45304530
NET_INC_STATS(sock_net(sk),
45314531
LINUX_MIB_TCPOFOMERGE);
4532-
__kfree_skb(skb1);
4532+
tcp_drop(sk, skb1);
45334533
goto merge_right;
45344534
}
45354535
} else if (tcp_try_coalesce(sk, skb1,

0 commit comments

Comments
 (0)