From owner-svn-src-stable@freebsd.org Wed Dec 9 17:17:45 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEA814AAA05; Wed, 9 Dec 2020 17:17:45 +0000 (UTC) (envelope-from kp@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CrkJT50CDz3PKd; Wed, 9 Dec 2020 17:17:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9E4311BF4; Wed, 9 Dec 2020 17:17:45 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B9HHjAa069349; Wed, 9 Dec 2020 17:17:45 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B9HHj6H069348; Wed, 9 Dec 2020 17:17:45 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202012091717.0B9HHj6H069348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 9 Dec 2020 17:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r368488 - stable/12/tests/sys/netpfil/pf X-SVN-Group: stable-12 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: stable/12/tests/sys/netpfil/pf X-SVN-Commit-Revision: 368488 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2020 17:17:45 -0000 Author: kp Date: Wed Dec 9 17:17:45 2020 New Revision: 368488 URL: https://svnweb.freebsd.org/changeset/base/368488 Log: MFC r368277: pf tests: Test case for bug #251414 Changing a table from not having counters to having counters (or vice versa) may trigger panics. PR: 251414 Modified: stable/12/tests/sys/netpfil/pf/table.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/tests/sys/netpfil/pf/table.sh ============================================================================== --- stable/12/tests/sys/netpfil/pf/table.sh Wed Dec 9 15:28:56 2020 (r368487) +++ stable/12/tests/sys/netpfil/pf/table.sh Wed Dec 9 17:17:45 2020 (r368488) @@ -108,8 +108,47 @@ v6_counters_cleanup() pft_cleanup } +atf_test_case "pr251414" "cleanup" +pr251414_head() +{ + atf_set descr 'Test PR 251414' + atf_set require.user root +} + +pr251414_body() +{ + pft_init + + epair_send=$(vnet_mkepair) + ifconfig ${epair_send}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair_send}b + jexec alcatraz ifconfig ${epair_send}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz \ + "pass all" \ + "table { self }" \ + "pass in log to " + + pft_set_rules noflush alcatraz \ + "pass all" \ + "table counters { self }" \ + "pass in log to " + + atf_check -s exit:0 -o ignore ping -c 3 192.0.2.2 + + jexec alcatraz pfctl -t tab -T show -vv +} + +pr251414_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" atf_add_test_case "v6_counters" + atf_add_test_case "pr251414" }