]> git.ipfire.org Git - thirdparty/nftables.git/commit
libnftables: add base directory of -f/--filename to include path
authorPablo Neira Ayuso <pablo@netfilter.org>
Fri, 14 Jun 2024 09:24:19 +0000 (11:24 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 25 Jun 2024 15:20:12 +0000 (17:20 +0200)
commit302e9f8b3a1382cf09db32541693b5df7d80ca1e
treedc38298820ace340cb2b87efa9b1da6d40a71056
parent2274d8a32f40aa55b118a9de2d642342837867b7
libnftables: add base directory of -f/--filename to include path

This patch adds an include path relative to the current (the including)
file's directory.

Users of -f/--filename have to explicitly specify -I with a redundant
path to find included files in the main file, eg.

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

Assuming:

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

The follow up patch ("libnftables: search for default include path last")
is also required according to what it is described in the manpage update
coming with this patch.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1661
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
doc/nft.txt
src/libnftables.c