public inbox for netfilter-devel@vger.kernel.org
 help / color / mirror / Atom feed
* [nft PATCH] mnl: Fix ordering of hooks in 'list hooks' output
@ 2026-03-20 15:16 Phil Sutter
  2026-03-20 15:21 ` Florian Westphal
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Sutter @ 2026-03-20 15:16 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: netfilter-devel, Florian Westphal

Hooks with same family, basehook and priority were inadvertently
inserted into the list in reverse ordering, fix that.

Suggested-by: Florian Westphal <fw@strlen.de>
Fixes: b98fee20bfe23 ("mnl: revisit hook listing")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/mnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mnl.c b/src/mnl.c
index 4893af8322ae6..b9efd3cfd3cea 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -2520,7 +2520,7 @@ static void basehook_list_add_tail(struct basehook *b, struct list_head *head)
 			continue;
 		if (!basehook_eq(hook, b))
 			continue;
-		if (hook->prio < b->prio)
+		if (hook->prio <= b->prio)
 			continue;
 
 		list_add(&b->list, &hook->list);
-- 
2.51.0


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

* Re: [nft PATCH] mnl: Fix ordering of hooks in 'list hooks' output
  2026-03-20 15:16 [nft PATCH] mnl: Fix ordering of hooks in 'list hooks' output Phil Sutter
@ 2026-03-20 15:21 ` Florian Westphal
  2026-03-20 15:31   ` Phil Sutter
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Westphal @ 2026-03-20 15:21 UTC (permalink / raw)
  To: Phil Sutter; +Cc: Pablo Neira Ayuso, netfilter-devel

Phil Sutter <phil@nwl.cc> wrote:
> Hooks with same family, basehook and priority were inadvertently
> inserted into the list in reverse ordering, fix that.

Right, just push this out.

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

* Re: [nft PATCH] mnl: Fix ordering of hooks in 'list hooks' output
  2026-03-20 15:21 ` Florian Westphal
@ 2026-03-20 15:31   ` Phil Sutter
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2026-03-20 15:31 UTC (permalink / raw)
  To: Florian Westphal; +Cc: Pablo Neira Ayuso, netfilter-devel

On Fri, Mar 20, 2026 at 04:21:42PM +0100, Florian Westphal wrote:
> Phil Sutter <phil@nwl.cc> wrote:
> > Hooks with same family, basehook and priority were inadvertently
> > inserted into the list in reverse ordering, fix that.
> 
> Right, just push this out.

Patch applied.

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

end of thread, other threads:[~2026-03-20 15:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 15:16 [nft PATCH] mnl: Fix ordering of hooks in 'list hooks' output Phil Sutter
2026-03-20 15:21 ` Florian Westphal
2026-03-20 15:31   ` Phil Sutter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox