]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: mnl: make family specification more strict when listing
authorFlorian Westphal <fw@strlen.de>
Wed, 31 Jul 2024 16:51:02 +0000 (18:51 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 19 Aug 2024 12:00:36 +0000 (14:00 +0200)
commit194dc496177a8197c617743ba3cce7f4dc8fffa7
tree7fd9cb65cd723efa76e746bb41382ef96c92ec24
parentaf712117df54d8620ed046d19a37ee62516d5f38
src: mnl: make family specification more strict when listing

make "nft list hooks <family>" more strict.

nft list hooks: query/list all NFPROTO_XXX values, i.e.
arp, bridge, ipv4, ipv6.

If a device is also given, then do include the netdev family for
the given device as well.

"nft list hooks arp" will only dump the hooks registered
for NFPROTO_ARP (or nothing at all if none are active).

"bridge", "ip", "ip6" will list the pre/in/forward/output/postrouting
hooks for these families, if any.

"inet" serves as an alias for "ip" and "ip6".

Link: https://lore.kernel.org/netfilter-devel/20240729153211.GA26048@breakpoint.cc/
Signed-off-by: Florian Westphal <fw@strlen.de>
src/mnl.c