]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
libnftables: do not re-add default include directory in include search path
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 24 Sep 2025 21:54:12 +0000 (23:54 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 25 Sep 2025 21:41:30 +0000 (23:41 +0200)
Otherwise globbing might duplicate included files because
include_path_glob() is called twice.

Fixes: 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")
Tested-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/libnftables.c

index c8293f77677fa9a224e089749ccfbfddda99c395..9f6a1bc335393712014535d6d768403c7f8da4b9 100644 (file)
@@ -176,6 +176,9 @@ static bool nft_ctx_find_include_path(struct nft_ctx *ctx, const char *path)
                        return true;
        }
 
+       if (!strcmp(path, DEFAULT_INCLUDE_PATH))
+               return true;
+
        return false;
 }