From patchwork Mon Jan 28 01:45:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in tcp_v4_conn_request() (updated) Date: Sun, 27 Jan 2013 15:45:50 -0000 From: Nivedita Singhvi X-Patchwork-Id: 216094 Message-Id: <1359337550-3958-1-git-send-email-niveditasinghvi@gmail.com> To: netdev@vger.kernel.org, David Miller Cc: Vijay Subramanian , Nivedita Singhvi From: Nivedita Singhvi We drop a connection request if the accept backlog is full and there are sufficient packets in the syn queue to warrant starting drops. Increment the appropriate counter so this isn't silent, for accurate stats and help in debugging. Signed-off-by: Nivedita Singhvi Acked-by: Vijay Subramanian --- net/ipv4/tcp_ipv4.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index bbbdcc5..49b4f50 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1502,8 +1502,10 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) * clogging syn queue with openreqs with exponentially increasing * timeout. */ - if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) + if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) { + NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS); goto drop; + } req = inet_reqsk_alloc(&tcp_request_sock_ops); if (!req)