netfilter: conntrack: add clash resolution stat counter
authorFlorian Westphal <fw@strlen.de>
Tue, 25 Aug 2020 22:52:44 +0000 (00:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 28 Aug 2020 17:51:26 +0000 (19:51 +0200)
commitbc92470413f3af152db0d8f90ef3eb13f8cc417a
tree90fafe6916c11e0944b2802ead68d954ddd6b178
parent4afc41dfa5a716e9e7a90c22972583f337c0bcbf
netfilter: conntrack: add clash resolution stat counter

There is a misconception about what "insert_failed" means.

We increment this even when a clash got resolved, so it might not indicate
a problem.

Add a dedicated counter for clash resolution and only increment
insert_failed if a clash cannot be resolved.

For the old /proc interface, export this in place of an older stat
that got removed a while back.
For ctnetlink, export this with a new attribute.

Also correct an outdated comment that implies we add a duplicate tuple --
we only add the (unique) reply direction.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/linux/netfilter/nf_conntrack_common.h
include/uapi/linux/netfilter/nfnetlink_conntrack.h
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_standalone.c