netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nft] libnftables: do not re-add default include directory in include search
@ 2025-09-24 22:21 Pablo Neira Ayuso
  2025-09-25 20:00 ` Jeremy Sowden
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Neira Ayuso @ 2025-09-24 22:21 UTC (permalink / raw)
  To: netfilter-devel

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

Fixes: 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/libnftables.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/libnftables.c b/src/libnftables.c
index c8293f77677f..9f6a1bc33539 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -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;
 }
 
-- 
2.30.2


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

* Re: [PATCH nft] libnftables: do not re-add default include directory in include search
  2025-09-24 22:21 [PATCH nft] libnftables: do not re-add default include directory in include search Pablo Neira Ayuso
@ 2025-09-25 20:00 ` Jeremy Sowden
  2025-09-25 21:42   ` Pablo Neira Ayuso
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Sowden @ 2025-09-25 20:00 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 873 bytes --]

On 2025-09-25, at 00:21:19 +0200, Pablo Neira Ayuso wrote:
>Otherwise globbing might duplicate included files because
>include_path_glob() is called twice.
>
>Fixes: 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")
>Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Tested-by: Jeremy Sowden <jeremy@azazel.net>

LGTM.  Will get this into Debian.

Thanks, Pablo.

J.

>---
> src/libnftables.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/src/libnftables.c b/src/libnftables.c
>index c8293f77677f..9f6a1bc33539 100644
>--- a/src/libnftables.c
>+++ b/src/libnftables.c
>@@ -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;
> }
>
>-- 
>2.30.2
>
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 931 bytes --]

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

* Re: [PATCH nft] libnftables: do not re-add default include directory in include search
  2025-09-25 20:00 ` Jeremy Sowden
@ 2025-09-25 21:42   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2025-09-25 21:42 UTC (permalink / raw)
  To: Jeremy Sowden; +Cc: netfilter-devel

On Thu, Sep 25, 2025 at 09:00:36PM +0100, Jeremy Sowden wrote:
> On 2025-09-25, at 00:21:19 +0200, Pablo Neira Ayuso wrote:
> > Otherwise globbing might duplicate included files because
> > include_path_glob() is called twice.
> > 
> > Fixes: 7eb950a8e8fa ("libnftables: include canonical path to avoid duplicates")
> > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> 
> Tested-by: Jeremy Sowden <jeremy@azazel.net>
> 
> LGTM.  Will get this into Debian.

Applied, thanks for testing.

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

end of thread, other threads:[~2025-09-25 21:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 22:21 [PATCH nft] libnftables: do not re-add default include directory in include search Pablo Neira Ayuso
2025-09-25 20:00 ` Jeremy Sowden
2025-09-25 21:42   ` 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).