All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft v2 0/5] src: mnl: rework list hooks infra
@ 2024-07-31 16:51 Florian Westphal
  2024-07-31 16:51 ` [PATCH nft v2 1/5] src: mnl: clean up hook listing code Florian Westphal
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Florian Westphal @ 2024-07-31 16:51 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Florian Westphal

Turns out that not only was 'nft list hooks' mostly undocumented,
there was also confusion on what it should do.

First, clean this code up and make it strictly a tool to dump
the NFPROTO_X registered functions.

Then, remove the 'hook' function argument, this was still passed
from back in the day when one could ask to only dump e.g.
ipv4 prerouting.  This ability is of little value, so don't restore
this but instead just remove the leftover code.

Next, allow dumping of netdev:egress hooks.
Lastly, document this in more detail and make it clear that this
dumps the netfilter hooks registered for the protocol families,
and nothing else.

Once this gets applied I intend to make
'nft list hooks netdev'

dump device hooks for all interfaces, if any, instead of a
'no device provided' warning.

Florian Westphal (5):
  src: mnl: clean up hook listing code
  src: mnl: make family specification more strict when listing
  src: drop obsolete hook argument form hook dump functions
  src: add egress support for 'list hooks'
  doc: add documentation about list hooks feature

 Makefile.am                 |   1 +
 doc/additional-commands.txt | 116 ++++++++++++++++++++++++++++
 doc/nft.txt                 |  63 +--------------
 include/mnl.h               |   2 +-
 src/mnl.c                   | 150 ++++++++++++++----------------------
 src/rule.c                  |   6 +-
 6 files changed, 179 insertions(+), 159 deletions(-)
 create mode 100644 doc/additional-commands.txt

-- 
2.44.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-08-07 17:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 16:51 [PATCH nft v2 0/5] src: mnl: rework list hooks infra Florian Westphal
2024-07-31 16:51 ` [PATCH nft v2 1/5] src: mnl: clean up hook listing code Florian Westphal
2024-07-31 16:51 ` [PATCH nft v2 2/5] src: mnl: make family specification more strict when listing Florian Westphal
2024-07-31 16:51 ` [PATCH nft v2 3/5] src: drop obsolete hook argument form hook dump functions Florian Westphal
2024-07-31 16:51 ` [PATCH nft v2 4/5] src: add egress support for 'list hooks' Florian Westphal
2024-07-31 16:51 ` [PATCH nft v2 5/5] doc: add documentation about list hooks feature Florian Westphal
2024-08-07 16:54 ` [PATCH nft v2 0/5] src: mnl: rework list hooks infra Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.