svn commit: r368235 - stable/12/tests/sys/netpfil/pf/ioctl
Kristof Provost
kp at FreeBSD.org
Tue Dec 1 16:02:53 UTC 2020
Author: kp
Date: Tue Dec 1 16:02:52 2020
New Revision: 368235
URL: https://svnweb.freebsd.org/changeset/base/368235
Log:
MFC r367990:
pf tests: provoke tag hashing panic
Attempt to provoke the panic fixed in r367987.
Modified:
stable/12/tests/sys/netpfil/pf/ioctl/validation.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/tests/sys/netpfil/pf/ioctl/validation.c
==============================================================================
--- stable/12/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 1 15:53:12 2020 (r368234)
+++ stable/12/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 1 16:02:52 2020 (r368235)
@@ -790,6 +790,43 @@ ATF_TC_CLEANUP(getsrcnodes, tc)
COMMON_CLEANUP();
}
+ATF_TC_WITH_CLEANUP(tag);
+ATF_TC_HEAD(tag, tc)
+{
+ atf_tc_set_md_var(tc, "require.user", "root");
+}
+
+ATF_TC_BODY(tag, tc)
+{
+ struct pfioc_rule rule;
+
+ COMMON_HEAD();
+
+ memset(&rule, 0x42, 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;
+
+ for (int i = 0; i < 10; i++)
+ ioctl(dev, DIOCADDRULE, &rule);
+}
+
+ATF_TC_CLEANUP(tag, tc)
+{
+ COMMON_CLEANUP();
+}
+
ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC(tp, addtables);
@@ -811,6 +848,7 @@ ATF_TP_ADD_TCS(tp)
ATF_TP_ADD_TC(tp, cxrollback);
ATF_TP_ADD_TC(tp, commit);
ATF_TP_ADD_TC(tp, getsrcnodes);
+ ATF_TP_ADD_TC(tp, tag);
return (atf_no_error());
}
More information about the svn-src-stable-12
mailing list