diff options
author | Kajetan Staszkiewicz <vegeta@tuxpowered.net> | 2024-09-26 14:48:57 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2024-09-26 14:50:45 +0000 |
commit | f28d5ac5c4a498883b626db163c86b5112889078 (patch) | |
tree | 5cf6713f76210501550f0ef9c0fda1a191b25fd1 | |
parent | 21525fe03c05cebb951214e78e411a3040e8a798 (diff) | |
download | src-f28d5ac5c4a4.tar.gz src-f28d5ac5c4a4.zip |
pf tests: fix max_states test
Ensure our rule with '(max 3)' only matches the TCP states we're counting.
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D46795
-rwxr-xr-x | tests/sys/netpfil/pf/max_states.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/sys/netpfil/pf/max_states.sh b/tests/sys/netpfil/pf/max_states.sh index 677d6f473d97..03142eeaffa6 100755 --- a/tests/sys/netpfil/pf/max_states.sh +++ b/tests/sys/netpfil/pf/max_states.sh @@ -39,14 +39,14 @@ max_states_body() pft_set_rules router \ "block" \ - "pass quick inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ - "pass in on ${epair_tester}b keep state (max 3)" \ - "pass out on ${epair_server}a keep state" + "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \ + "pass in on ${epair_tester}b inet6 proto tcp keep state (max 3)" \ + "pass out on ${epair_server}a inet6 proto tcp keep state" - # The exact limit is off by 1 ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4201 ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4202 - ping_dummy_check_request exit:1 --ping-type=tcpsyn --send-sport=4203 + ping_dummy_check_request exit:0 --ping-type=tcpsyn --send-sport=4203 + ping_dummy_check_request exit:1 --ping-type=tcpsyn --send-sport=4204 } max_states_cleanup() |