Date: Tue, 4 May 2021 12:02:22 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: dbe42afd0a95 - stable/12 - pf tests: Test using '<ifgroup>:network' in tables Message-ID: <202105041202.144C2MF7093230@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dbe42afd0a95d943331c2552582df8c4b8a23222 commit dbe42afd0a95d943331c2552582df8c4b8a23222 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-04-25 10:18:48 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-05-04 07:54:45 +0000 pf tests: Test using '<ifgroup>:network' in tables MFC after: 1 week (cherry picked from commit daa5350d0e0c5fbe42c5a057dd37b9d22df91bb7) --- tests/sys/netpfil/pf/table.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 8aae4cf492c5..5826fab245d8 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -146,9 +146,41 @@ pr251414_cleanup() pft_cleanup } +atf_test_case "network" "cleanup" +network_head() +{ + atf_set descr 'Test <ifgroup>:network' + atf_set require.user root +} + +network_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "table <allow> const { epair:network }"\ + "block in" \ + "pass in from <allow>" + + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 +} + +network_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" atf_add_test_case "v6_counters" atf_add_test_case "pr251414" + atf_add_test_case "network" }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105041202.144C2MF7093230>