]> 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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 1 Sep 2025 20:47:56 +0000 (22:47 +0200)
commit0d62ca28833bb98da1edcb7c6b5e283225c9ae87
tree736c1f8ac0effc15b64210fe90a7915ae373b15f
parentd2ed2a42acdd20c74bb13de73f924ad719937fc6
src: mnl: make family specification more strict when listing

commit 194dc496177a8197c617743ba3cce7f4dc8fffa7 upstream.

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