Skip to contentSkip to conversation

libnftables: do not re-add default include directory in include search

PATCH In review Pablo Neira Ayuso 2 participants 3 messages Sep 24, 2025 – Sep 25, 2025 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 libnftables: do not re-add default include directory in include search

Otherwise globbing might duplicate included files because include_path_glob() is called twice.

Fixes 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")
---
 src/libnftables.c | 3 +++
 1 file changed, 3 insertions(+)
src/libnftables.c +3 -0
index c8293f77677f..9f6a1bc33539 100644
@@ -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;
 }
 
Signature · 1 line
2.30.2
Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Pablo Neira Ayuso

Otherwise globbing might duplicate included files because include_path_glob() is called twice.

Fixes 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")

LGTM. Will get this into Debian.

Thanks, Pablo.

J.

Quoted 22 lines

---
src/libnftables.c | 3 +++

1 file changed, 3 insertions(+)
src/libnftables.c +3 -0
index c8293f77677f..9f6a1bc33539 100644
@@ -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;
 }
 
Signature · 1 line
2.30.2