aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-07-23 12:28:20 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-23 15:01:36 -0400
commit8541b21e781a22dce52a74fef0b9bed00404a1cd (patch)
treed86d5837152ca635fc33f08a1f81a81124c944eb /net/ipv4/tcp_input.c
parent3d4bf93ac12003f9b8e1e2de37fe27983deebdcf (diff)
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: 9f5afeae5152 ("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>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 78068b902e7b..b062a7692238 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4510,7 +4510,7 @@ coalesce_done:
4510 /* All the bits are present. Drop. */ 4510 /* All the bits are present. Drop. */
4511 NET_INC_STATS(sock_net(sk), 4511 NET_INC_STATS(sock_net(sk),
4512 LINUX_MIB_TCPOFOMERGE); 4512 LINUX_MIB_TCPOFOMERGE);
4513 __kfree_skb(skb); 4513 tcp_drop(sk, skb);
4514 skb = NULL; 4514 skb = NULL;
4515 tcp_dsack_set(sk, seq, end_seq); 4515 tcp_dsack_set(sk, seq, end_seq);
4516 goto add_sack; 4516 goto add_sack;
@@ -4529,7 +4529,7 @@ coalesce_done:
4529 TCP_SKB_CB(skb1)->end_seq); 4529 TCP_SKB_CB(skb1)->end_seq);
4530 NET_INC_STATS(sock_net(sk), 4530 NET_INC_STATS(sock_net(sk),
4531 LINUX_MIB_TCPOFOMERGE); 4531 LINUX_MIB_TCPOFOMERGE);
4532 __kfree_skb(skb1); 4532 tcp_drop(sk, skb1);
4533 goto merge_right; 4533 goto merge_right;
4534 } 4534 }
4535 } else if (tcp_try_coalesce(sk, skb1, 4535 } else if (tcp_try_coalesce(sk, skb1,