netfilter: ctnetlink: export nf_conntrack_max
authorFlorent Fourcot <florent.fourcot@wifirst.fr>
Sun, 6 May 2018 14:30:14 +0000 (16:30 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 6 May 2018 22:04:02 +0000 (00:04 +0200)
commit538c5672be6d67b7b10c15701588e20617374973
tree1781bcc0453ea536af4ad4c69e5e7016d631406b
parentbfb15f2a95cbbc548b59abf8007d0fdb35fdfee5
netfilter: ctnetlink: export nf_conntrack_max

IPCTNL_MSG_CT_GET_STATS netlink command allow to monitor current number
of conntrack entries. However, if one wants to compare it with the
maximum (and detect exhaustion), the only solution is currently to read
sysctl value.

This patch add nf_conntrack_max value in netlink message, and simplify
monitoring for application built on netlink API.

Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nfnetlink_conntrack.h
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c