diff options
author | Eric Dumazet <edumazet@google.com> | 2016-08-24 18:01:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-26 01:43:11 +0200 |
commit | 72145a68e4ee116533df49af4b87aca0aacc179c (patch) | |
tree | 31b022a336cbd4cb3554a7b3a46f1e9ec35f6e1c /net/ipv4/tcp_ipv4.c | |
parent | tcp: md5: increment sk_drops on syn_recv state (diff) | |
download | linux-72145a68e4ee116533df49af4b87aca0aacc179c.tar.xz linux-72145a68e4ee116533df49af4b87aca0aacc179c.zip |
tcp: md5: add LINUX_MIB_TCPMD5FAILURE counter
Adds SNMP counter for drops caused by MD5 mismatches.
The current syslog might help, but a counter is more precise and helps
monitoring.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 436d978c6c39..ad41e8ecf796 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1169,6 +1169,7 @@ static bool tcp_v4_inbound_md5_hash(const struct sock *sk, NULL, skb); if (genhash || memcmp(hash_location, newhash, 16) != 0) { + NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMD5FAILURE); net_info_ratelimited("MD5 Hash failed for (%pI4, %d)->(%pI4, %d)%s\n", &iph->saddr, ntohs(th->source), &iph->daddr, ntohs(th->dest), |