Date: Wed, 4 Sep 2024 08:53:31 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2c76404c79ac - stable/13 - pf tests: ensure that neighbour discovery works as expected Message-ID: <202409040853.4848rVKY005554@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c76404c79ac67d8d3df1d11881dce9c2fa44cca commit 2c76404c79ac67d8d3df1d11881dce9c2fa44cca Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2024-08-26 13:02:22 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2024-09-04 08:53:06 +0000 pf tests: ensure that neighbour discovery works as expected Also check repeated calls. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d154dc21130b607d7903f276dd6d463b990f33f7) --- tests/sys/netpfil/pf/icmp6.sh | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/sys/netpfil/pf/icmp6.sh b/tests/sys/netpfil/pf/icmp6.sh index b9b60a484afc..eb286e23ef4c 100644 --- a/tests/sys/netpfil/pf/icmp6.sh +++ b/tests/sys/netpfil/pf/icmp6.sh @@ -149,8 +149,56 @@ ttl_exceeded_cleanup() pft_cleanup } +atf_test_case "repeat" "cleanup" +repeat_head() +{ + atf_set descr 'Ensure that repeated NDs work' + atf_set require.user root + atf_set require.progs ndisc6 +} + +repeat_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -c 1 2001:db8::1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "block all" \ + "pass quick inet6 proto ipv6-icmp all icmp6-type neighbrsol keep state (if-bound) ridentifier 1000000107" + + jexec alcatraz pfctl -x loud + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv + + atf_check -s exit:0 -o ignore \ + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv + atf_check -s exit:0 -o ignore \ + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv + atf_check -s exit:0 -o ignore \ + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv +} + +repeat_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "zero_id" atf_add_test_case "ttl_exceeded" + atf_add_test_case "repeat" }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409040853.4848rVKY005554>