netfilter: add new hook nfnl subsystem
authorFlorian Westphal <fw@strlen.de>
Fri, 4 Jun 2021 10:27:07 +0000 (12:27 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 7 Jun 2021 10:41:10 +0000 (12:41 +0200)
commite2cf17d3774c323ef6dab6e9f7c0cfc5e742afd9
treedf417e59ee44a55fba64916b025486feb12090b0
parent7b4b2fa37587394fb89fa51a4bea0820a1b37a5d
netfilter: add new hook nfnl subsystem

This nfnl subsystem allows to dump the list of all active netfiler hooks,
e.g. defrag, conntrack, nf/ip/arp/ip6tables and so on.

This helps to see what kind of features are currently enabled in
the network stack.

Sample output from nft tool using this infra:

 $ nft list hook ip input
 family ip hook input {
   +0000000010 nft_do_chain_inet [nf_tables] # nft table firewalld INPUT
   +0000000100 nf_nat_ipv4_local_in [nf_nat]
   +2147483647 ipv4_confirm [nf_conntrack]
 }

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nfnetlink.h
include/uapi/linux/netfilter/nfnetlink_hook.h [new file with mode: 0644]
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/nfnetlink.c
net/netfilter/nfnetlink_hook.c [new file with mode: 0644]