Skip to content

Commit ec645ae

Browse files
edumazetgregkh
authored andcommitted
tcp: call tcp_drop() from tcp_data_queue_ofo()
[ Upstream commit 8541b21 ] 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 <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6285a74 commit ec645ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎net/ipv4/tcp_input.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4492,7 +4492,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
44924492
/* All the bits are present. Drop. */
44934493
NET_INC_STATS(sock_net(sk),
44944494
LINUX_MIB_TCPOFOMERGE);
4495-
__kfree_skb(skb);
4495+
tcp_drop(sk, skb);
44964496
skb = NULL;
44974497
tcp_dsack_set(sk, seq, end_seq);
44984498
goto add_sack;
@@ -4511,7 +4511,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb)
45114511
TCP_SKB_CB(skb1)->end_seq);
45124512
NET_INC_STATS(sock_net(sk),
45134513
LINUX_MIB_TCPOFOMERGE);
4514-
__kfree_skb(skb1);
4514+
tcp_drop(sk, skb1);
45154515
goto merge_right;
45164516
}
45174517
} else if (tcp_try_coalesce(sk, OOO_QUEUE, skb1,

0 commit comments

Comments
 (0)