The branch main has been updated by kp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=0cd95355a509f26d4c207087830a3dc640229c4d

commit 0cd95355a509f26d4c207087830a3dc640229c4d
Author:     Kristof Provost <k...@freebsd.org>
AuthorDate: 2025-02-05 08:22:40 +0000
Commit:     Kristof Provost <k...@freebsd.org>
CommitDate: 2025-02-05 20:06:54 +0000

    pf tests: extend set-tos test
    
    Verify that we can set-tos on pass rules, and that this still works even if 
a
    'scrub' option is present on the pass rule.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 tests/sys/netpfil/pf/set_tos.sh | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/sys/netpfil/pf/set_tos.sh b/tests/sys/netpfil/pf/set_tos.sh
index bfec61f0d221..1f7681feabaa 100644
--- a/tests/sys/netpfil/pf/set_tos.sh
+++ b/tests/sys/netpfil/pf/set_tos.sh
@@ -191,6 +191,22 @@ v6_body()
                --to 2001:db8:192::2 \
                --replyif ${epair}a \
                --expect-tc 0
+
+       # We can set tos on pass rules
+       pft_set_rules alcatraz "pass out set tos 13"
+       atf_check -s exit:0 -o ignore -e ignore ${common_dir}/pft_ping.py \
+               --sendif ${epair}a \
+               --to 2001:db8:192::2 \
+               --replyif ${epair}a \
+               --expect-tc 13
+
+       # And that still works with 'scrub' options too
+       pft_set_rules alcatraz "pass out set tos 14 scrub (min-ttl 64)"
+       atf_check -s exit:0 -o ignore -e ignore ${common_dir}/pft_ping.py \
+               --sendif ${epair}a \
+               --to 2001:db8:192::2 \
+               --replyif ${epair}a \
+               --expect-tc 14
 }
 
 v6_cleanup()

Reply via email to