From nobody Fri Feb 04 14:23:24 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C08A019A81D5; Fri, 4 Feb 2022 14:23:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JqySY5xVnz4S1l; Fri, 4 Feb 2022 14:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643984606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YTfr5m+DXlDn/jVY93wGLpVDMm77fCOykRPrq2FMLN0=; b=HpzNvYRbQF1YmPzV2Zm5j3n8D+Q0RjTmca1Hr6c/Ui74uFELChbBfNOHmT0fmH39GdhylY 8D9lubNxIHl/nw5Yzj64vhHL3f4nsALLqHetO61jQ1jW3JMnvfT5H618lUWJJ54r3/Zukq +E0KYGA74ZunCKAIOBb+pF2dO82nZsA8L2FlL/5NtYCdIbn52bB20T4/EqPHC/Z87O4351 rgZNTEItHWvactyzyAA0bvPs9/6EaxqaNnYPokxuF2PzNhr5tQCa2UnJnzpRl3W/9HU3P+ Ayp/sDzMhktjXRd8qxANFCqogxi+k9AH+Cffk+MdXOVqDngUE92Ph8ifLmrEkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E6625073; Fri, 4 Feb 2022 14:23:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 214ENPw9051205; Fri, 4 Feb 2022 14:23:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 214ENOCj051204; Fri, 4 Feb 2022 14:23:24 GMT (envelope-from git) Date: Fri, 4 Feb 2022 14:23:24 GMT Message-Id: <202202041423.214ENOCj051204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 5f11f3cb1fbf - stable/13 - pf tests: Provoke failure in pf_ioctl_addrule List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5f11f3cb1fbf7a4caa670f037197c63880bc3ba9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643984606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YTfr5m+DXlDn/jVY93wGLpVDMm77fCOykRPrq2FMLN0=; b=wwS7PAtBRBQfjoiCeqOOqIVsaLvzkssT7GkFGitpBIIGOPNRInktM8aBrR8s4cVkyjK1W2 sFEN4YNOgird6k8jgpmWAiShnWGih+1a6rv1rbaxlBs2qfm7Ha0V09l/VSWvKr+sLnTe3P OlpS7DLWl9fwZ2H4ru+OWujrZ7n1Z6REK94SkDZV+xpe/dpUPxGKyp+zXm7y+fmHs1rYyI epNeQvYmnItU2YchHm8dbtIkdWqal3pwvDo8Vp55HiOcQsnH7kRVYLDhByQoPw+GIYlm28 67cJk6+w7AK9d9/6payiGo2Rd87gYm4EQclAqNRm8QJCWD3TXuin9m8YTojh/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643984606; a=rsa-sha256; cv=none; b=m0W7aw5WL0Cbfl45NSwg+Xdh4OWCvowjssKLO+YgQlg9YKn8+Etmk51tNduSVYnjcn8uCw HGcSjZzA7VPn+W3p7ZBB5G0/EGfREMY2jDrxUd0/yxv3UaDBJsN4UB07ql2QQIm8ir1KJz rIqhCtPXnOUz/AoFq3V559PKYurluvtZZc4qpHKq0HGr4uA4qLO6Jy0U9blrkhRWBPgEn8 h7VNqECDDsh84Yw7Jm23hLkln99g/1EkNNacpmSQ78eZtESs+Gn3XPi8MRnaeA7qShmQL+ F3ivprC5oOjqWB4tpSnsEm1qwddZ+2AATHUYdrYJVhHz+Xlf4fN7g7lFRnL1Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5f11f3cb1fbf7a4caa670f037197c63880bc3ba9 commit 5f11f3cb1fbf7a4caa670f037197c63880bc3ba9 Author: Kristof Provost AuthorDate: 2022-01-16 07:59:27 +0000 Commit: Kristof Provost 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()); }