diff options
author | Vijay Subramanian <subramanian.vijay@gmail.com> | 2013-01-31 03:24:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-04 13:06:27 -0500 |
commit | 848bf15f361c7c22da7998c81d50ed3dffbc827d (patch) | |
tree | 161e94adaafc94a9d4b320ba3e8d9cd829ad3e97 | |
parent | 9665d5d62487e8e7b1f546c00e11107155384b9a (diff) |
tcp: Update MIB counters for drops
This patch updates LINUX_MIB_LISTENDROPS in tcp_v4_conn_request() and
tcp_v4_err(). tcp_v4_conn_request() in particular can drop SYNs for various
reasons which are not currently tracked.
Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 629937d514eb..eadb693eef55 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -496,6 +496,7 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info) | |||
496 | * errors returned from accept(). | 496 | * errors returned from accept(). |
497 | */ | 497 | */ |
498 | inet_csk_reqsk_queue_drop(sk, req, prev); | 498 | inet_csk_reqsk_queue_drop(sk, req, prev); |
499 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); | ||
499 | goto out; | 500 | goto out; |
500 | 501 | ||
501 | case TCP_SYN_SENT: | 502 | case TCP_SYN_SENT: |
@@ -1502,7 +1503,6 @@ int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
1502 | */ | 1503 | */ |
1503 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) { | 1504 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) { |
1504 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS); | 1505 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS); |
1505 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); | ||
1506 | goto drop; | 1506 | goto drop; |
1507 | } | 1507 | } |
1508 | 1508 | ||
@@ -1669,6 +1669,7 @@ drop_and_release: | |||
1669 | drop_and_free: | 1669 | drop_and_free: |
1670 | reqsk_free(req); | 1670 | reqsk_free(req); |
1671 | drop: | 1671 | drop: |
1672 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); | ||
1672 | return 0; | 1673 | return 0; |
1673 | } | 1674 | } |
1674 | EXPORT_SYMBOL(tcp_v4_conn_request); | 1675 | EXPORT_SYMBOL(tcp_v4_conn_request); |