git: 3c58e64369fd - main - pf: set the correct type for rule timeouts
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Sep 2026 19:38:01 UTC
The branch main has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=3c58e64369fd8124c83f1c7d63106bddca83fa1e
commit 3c58e64369fd8124c83f1c7d63106bddca83fa1e
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-09-28 18:11:45 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-09-29 19:37:07 +0000
pf: set the correct type for rule timeouts
PR: 298877
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
---
sys/netpfil/pf/pf_nl.c | 2 +-
tests/sys/netpfil/pf/src_track.sh | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c
index 2f99d1e7c845..8a04c330f4eb 100644
--- a/sys/netpfil/pf/pf_nl.c
+++ b/sys/netpfil/pf/pf_nl.c
@@ -723,7 +723,7 @@ nlattr_add_timeout(struct nl_writer *nw, int attrtype,
return (false);
for (int i = 0; i < PFTM_MAX; i++)
- nlattr_add_u32(nw, PF_RT_TIMEOUT, timeout[i]);
+ nlattr_add_u32(nw, PF_TT_TIMEOUT, timeout[i]);
nlattr_set_len(nw, off);
diff --git a/tests/sys/netpfil/pf/src_track.sh b/tests/sys/netpfil/pf/src_track.sh
index 1b09030f6174..90a25e6970b4 100755
--- a/tests/sys/netpfil/pf/src_track.sh
+++ b/tests/sys/netpfil/pf/src_track.sh
@@ -660,6 +660,29 @@ check_valid_cleanup()
pft_cleanup
}
+atf_test_case "pr298877" "cleanup"
+pr298877_head()
+{
+ atf_set descr 'Test per rule timeout values'
+ atf_set require.user root
+}
+
+pr298877_body()
+{
+ pft_init
+
+ vnet_mkjail alcatraz
+ pft_set_rules alcatraz \
+ "pass in keep state (src.track 10)"
+
+ atf_check -s exit:0 -o match:'.*src.track 10.*' \
+ jexec alcatraz pfctl -sr
+}
+
+pr298877_cleanup()
+{
+ pft_cleanup
+}
atf_init_test_cases()
{
@@ -672,4 +695,5 @@ atf_init_test_cases()
atf_add_test_case "sn_types_pass"
atf_add_test_case "mixed_af"
atf_add_test_case "check_valid"
+ atf_add_test_case "pr298877"
}