Skip to contentSkip to conversation

mnl: Fix ordering of hooks in 'list hooks' output

PATCH In review Phil Sutter 2 participants 3 messages Mar 20 netfilter

lore
Share & tools
lore

Phil Sutter

author reviewer
#0 lore raw

PATCH 1/1 mnl: Fix ordering of hooks in 'list hooks' output

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

Fixes b98fee20bfe23 ("mnl: revisit hook listing")
---
 src/mnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/mnl.c +1 -1
index 4893af8322ae6..b9efd3cfd3cea 100644
@@ -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);
Signature · 1 line
2.51.0
maintainer
#1 lore raw
Quoted 2 lines · Phil Sutter

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

Right, just push this out.

author reviewer
#2 lore raw
Quoted 5 lines · Florian Westphal
Quoted 2 lines · Phil Sutter

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.