netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft 0/2] nft include path updates
@ 2024-06-15  9:18 Pablo Neira Ayuso
  2024-06-15  9:18 ` [PATCH nft 1/2] libnftables: add base directory of -f/--filename to include path Pablo Neira Ayuso
  2024-06-15  9:18 ` [PATCH nft 2/2] libnftables: search for default include path last Pablo Neira Ayuso
  0 siblings, 2 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2024-06-15  9:18 UTC (permalink / raw)
  To: netfilter-devel

Hi,

This patchset updates include path logic of nftables:

Patch #1 adds -f/--filename base directory as implicit include path,
         so users do not need to add a redundant -I/--includepath
         such as:

  # nft -I /path/to/files -f /path/to/files/ruleset.nft

Patch #2 searches for default include path last so users have a way
         to override the default include path either via -I/--includepath
         or the implicit include path added by Patch #1

  For instance, assuming you have:

  # cat /path/to/files/ruleset.nft
    include "file1.nft"
    include "file2.nft"
  # ls /path/to/files/
    file1.nft file2.nft

  then, make a copy of the ruleset:

  # mkdir update
  # cp -r /path/to/files/* update
  # vim update/file1.nft
  ...
      file edit goes here
  ...
  # nft -f copy/ruleset.nft

Comments welcome, thanks.

Pablo Neira Ayuso (2):
  libnftables: add base directory of -f/--filename to include path
  libnftables: search for default include path last

 doc/nft.txt       |  2 ++
 src/libnftables.c | 19 +++++++++++++-
 src/scanner.l     | 63 ++++++++++++++++++++++++++++++-----------------
 3 files changed, 61 insertions(+), 23 deletions(-)

--
2.30.2


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

end of thread, other threads:[~2024-06-15  9:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-15  9:18 [PATCH nft 0/2] nft include path updates Pablo Neira Ayuso
2024-06-15  9:18 ` [PATCH nft 1/2] libnftables: add base directory of -f/--filename to include path Pablo Neira Ayuso
2024-06-15  9:18 ` [PATCH nft 2/2] libnftables: search for default include path last Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).