diff options
author | Franco Fichtner <franco@opnsense.org> | 2024-11-13 07:49:49 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2024-11-13 09:34:08 +0000 |
commit | 3b337076ba61ccb7280543ebe3737bc32b7f8a89 (patch) | |
tree | 963902bc525c9301fa988e62cd7f025b5935a422 | |
parent | 371bd29d4b22257a7e92e1e711cca3d94cfbd00d (diff) |
pf: remove stale no_df tests from fragemtation_*.sh
compat: test case add was previously removed but not the test itself
pass: test was added twice
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D47535
-rw-r--r-- | tests/sys/netpfil/pf/fragmentation_compat.sh | 47 | ||||
-rw-r--r-- | tests/sys/netpfil/pf/fragmentation_pass.sh | 56 |
2 files changed, 1 insertions, 102 deletions
diff --git a/tests/sys/netpfil/pf/fragmentation_compat.sh b/tests/sys/netpfil/pf/fragmentation_compat.sh index 21ce6b734ea1..e9b89f5ff170 100644 --- a/tests/sys/netpfil/pf/fragmentation_compat.sh +++ b/tests/sys/netpfil/pf/fragmentation_compat.sh @@ -326,53 +326,6 @@ reassemble_cleanup() pft_cleanup } -atf_test_case "no_df" "cleanup" -no_df_head() -{ - atf_set descr 'Test removing of DF flag' - atf_set require.user root -} - -no_df_body() -{ - setup_router_server_ipv4 - - ifconfig ${epair_tester}a mtu 9000 - jexec router ifconfig ${epair_tester}b mtu 9000 - jexec router ifconfig ${epair_server}a mtu 1500 - jexec server ifconfig ${epair_server}b mtu 1500 - - # Sanity check. - ping_server_check_reply exit:0 --ping-type=icmp - - pft_set_rules router \ - "scrub fragment reassemble" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with normal, fragmentable packets. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 - - # Ping with non-fragmentable packets, this will fail. - ping_server_check_reply exit:1 --ping-type=icmp --send-length=2000 --send-flags DF - - pft_set_rules router \ - "scrub any reassemble" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with non-fragmentable packets again. - # This time pf will strip the DF flag. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 --send-flags DF -} - -no_df_cleanup() -{ - pft_cleanup -} - atf_init_test_cases() { atf_add_test_case "too_many_fragments" diff --git a/tests/sys/netpfil/pf/fragmentation_pass.sh b/tests/sys/netpfil/pf/fragmentation_pass.sh index 94a25cc41988..2399eb0374bb 100644 --- a/tests/sys/netpfil/pf/fragmentation_pass.sh +++ b/tests/sys/netpfil/pf/fragmentation_pass.sh @@ -344,61 +344,6 @@ no_df_body() { setup_router_server_ipv4 - ifconfig ${epair_tester}a mtu 9000 - jexec router ifconfig ${epair_tester}b mtu 9000 - jexec router ifconfig ${epair_server}a mtu 1500 - jexec server ifconfig ${epair_server}b mtu 1500 - - # Sanity check. - ping_server_check_reply exit:0 --ping-type=icmp - - pft_set_rules router \ - "set reassemble no" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with normal, fragmentable packets. - ping_server_check_reply exit:1 --ping-type=icmp --send-length=2000 - - pft_set_rules router \ - "set reassemble yes" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with normal, fragmentable packets. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 - - # Ping with non-fragmentable packets. - ping_server_check_reply exit:1 --ping-type=icmp --send-length=2000 --send-flags DF - - pft_set_rules router \ - "set reassemble yes no-df" \ - "pass out" \ - "block in" \ - "pass in inet proto icmp all icmp-type echoreq" - - # Ping with non-fragmentable packets again. - # This time pf will strip the DF flag. - ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 --send-flags DF -} -no_df_cleanup() -{ - pft_cleanup -} - -atf_test_case "no_df" "cleanup" -no_df_head() -{ - atf_set descr 'Test removing of DF flag' - atf_set require.user root -} - -no_df_body() -{ - setup_router_server_ipv4 - # Tester can send long packets which will get fragmented by the router. # Replies from server will come in fragments which might get # reassembled resulting in a long reply packet sent back to tester. @@ -420,6 +365,7 @@ no_df_body() # getting properly forwarded. ping_server_check_reply exit:0 --ping-type=icmp --send-length=2000 --send-flags DF } + no_df_cleanup() { pft_cleanup |