Date: Fri, 4 Feb 2022 14:23:24 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: 5f11f3cb1fbf - stable/13 - pf tests: Provoke failure in pf_ioctl_addrule Message-ID: <202202041423.214ENOCj051204@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=5f11f3cb1fbf7a4caa670f037197c63880bc3ba9 commit 5f11f3cb1fbf7a4caa670f037197c63880bc3ba9 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2022-01-16 07:59:27 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2022-02-04 10:38:15 +0000 pf tests: Provoke failure in pf_ioctl_addrule MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 4ca41937606064c78a4f5725bb0b2ba021cfd7c3) --- tests/sys/netpfil/pf/ioctl/validation.c | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/tests/sys/netpfil/pf/ioctl/validation.c b/tests/sys/netpfil/pf/ioctl/validation.c index 0d7f7631e91b..947193599b31 100644 --- a/tests/sys/netpfil/pf/ioctl/validation.c +++ b/tests/sys/netpfil/pf/ioctl/validation.c @@ -832,6 +832,44 @@ ATF_TC_CLEANUP(tag, tc) COMMON_CLEANUP(); } +ATF_TC_WITH_CLEANUP(rpool_mtx); +ATF_TC_HEAD(rpool_mtx, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + +ATF_TC_BODY(rpool_mtx, tc) +{ + struct pfioc_rule rule; + + COMMON_HEAD(); + + memset(&rule, 0, sizeof(rule)); + + rule.ticket = 0; + rule.pool_ticket = 0; + rule.anchor[0] = 0; + + rule.rule.return_icmp = 0; + bzero(&rule.rule.src, sizeof(rule.rule.src)); + bzero(&rule.rule.dst, sizeof(rule.rule.dst)); + + rule.rule.ifname[0] = 0; + rule.rule.action = 0; + rule.rule.rtableid = 0; + + rule.rule.tagname[0] = 0; + rule.rule.action = 42; + + ioctl(dev, DIOCADDRULE, &rule); +} + +ATF_TC_CLEANUP(rpool_mtx, tc) +{ + COMMON_CLEANUP(); +} + + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, addtables); @@ -854,6 +892,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, commit); ATF_TP_ADD_TC(tp, getsrcnodes); ATF_TP_ADD_TC(tp, tag); + ATF_TP_ADD_TC(tp, rpool_mtx); return (atf_no_error()); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202041423.214ENOCj051204>