Module Name: src
Committed By: martin
Date: Wed Aug 23 18:22:51 UTC 2023
Modified Files:
src/sys/net/npf [netbsd-9]: npf_ruleset.c
Log Message:
Pull up following revision(s) (requested by kardel in ticket #1725):
sys/net/npf/npf_ruleset.c: revision 1.52
The analysis documented in PR misc/56990 is correct.
Fix by not returning when encountering a ruleset rule.
The code up to now would stop at any group rule.
ruleset rules are marked as group rule and a dynamic rule.
processing is only finished when a result is present AND
we are looking at a plain group rule.
To generate a diff of this commit:
cvs rdiff -u -r1.48.2.3 -r1.48.2.4 src/sys/net/npf/npf_ruleset.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/npf/npf_ruleset.c
diff -u src/sys/net/npf/npf_ruleset.c:1.48.2.3 src/sys/net/npf/npf_ruleset.c:1.48.2.4
--- src/sys/net/npf/npf_ruleset.c:1.48.2.3 Sat Jun 20 15:46:48 2020
+++ src/sys/net/npf/npf_ruleset.c Wed Aug 23 18:22:51 2023
@@ -34,7 +34,7 @@
#ifdef _KERNEL
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.48.2.3 2020/06/20 15:46:48 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.48.2.4 2023/08/23 18:22:51 martin Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -891,7 +891,7 @@ npf_ruleset_inspect(npf_cache_t *npc, co
KASSERT(n < skip_to);
/* Group is a barrier: return a matching if found any. */
- if ((attr & NPF_RULE_GROUP) != 0 && final_rl) {
+ if ((attr & NPF_DYNAMIC_GROUP) == NPF_RULE_GROUP && final_rl) {
break;
}