From nobody Mon Sep 12 08:20:52 2022 X-Original-To: dev-commits-src-main@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 4MR00h6MFSz4bqhc; Mon, 12 Sep 2022 08:20:52 +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 4MR00h5kJCz3TmR; Mon, 12 Sep 2022 08:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662970852; 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=PTW7Pw2MxhdxItqxTwexZbOCwuqHXFMeGKsGzHemmig=; b=cmFh7YgrfPtlrLnHu7bYClsqM/EAOIMAXrk8bHISpZinVZaOJSaxb0ct8ugXmX/hhaN6Ji 9cSLg/u6Qjc+vzhQ8+I21nx3l2Vi4+PZp7wNYQO+GepPONX2Qqf4x+07+SbxdQD75GmNbw smWTIJwdcqUNnA8Ty++LoyMWis8SQsBGhMBOVP5HsIyekZtk6TCOhUe0xZu/NIc/ipkrQG BADsnOIIe/b6Csd8adW9I5PjnxfYmkKGhg3ZaOPSdNTsotBlghLsftKP/SaIpsDnmn7B7U B2S81mf7WGMrOJhK6d988nl/DHm7EMoshss6N2kJplZPflG+WHnE/k2U0qgMdw== 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 4MR00h4m2Gzvxg; Mon, 12 Sep 2022 08:20:52 +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 28C8KqYO067077; Mon, 12 Sep 2022 08:20:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28C8KqN6067076; Mon, 12 Sep 2022 08:20:52 GMT (envelope-from git) Date: Mon, 12 Sep 2022 08:20:52 GMT Message-Id: <202209120820.28C8KqN6067076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 95d5a656a2b6 - main - pf tests: syncookie limits test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 95d5a656a2b69e38461fcfba31e9f517648bd52a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662970852; 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=PTW7Pw2MxhdxItqxTwexZbOCwuqHXFMeGKsGzHemmig=; b=R4sVA0+8JYipGuTPSmnkRpUmv+ixbLqhroCj0HuSUpSD7AtDdmb/GeyBfHFMP9pYhzL+T0 Kiwn1mehNxGCtdx5LWPNTfN1AWWyzy5IE8yK+45tk7DynWbe79AdS9mbhStZpjmjIWjzaf EXLzrE2ZHs7lbqXvYwfkX1L1bt4Lr0TPI6DFccZQn+yKb8CjYUWlwlDfyOPHais84NL1FH vitGW1lx9l5iIBsQPomWaD69pPk4BGOZC8TY7v3VFnmj8bplEQWl8pEjBU2ZI6po/5EHcS Fjw/cOr4uMY/2umdeMkju2BjrdoxnWgbiu713IzxIDWEV8utzKX/PXaYAhf29g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662970852; a=rsa-sha256; cv=none; b=v2UQ3Rib17SAMk007pk8DJPMzwX3Nkl5pxurmuk8oTQGU8JVyDYwyHX6khsNDNeg2UqdRu gY+c6lr6N6dymEVCGyn8xCACWjXJF4fR14Y1Xok5Zx4kWU1hDbTvtAdwbUbm5cFuNOhvAK OUqEYFS0TW0Ck+OAhn3kVaFzy3fz6YgiylLia5xFYNmHsTb4gC37YHLq3LacOYR3JwiFJr R6Bq1sl8qrk0gO4jgLKpV/jH3nRzpp0pY+uApqSCjml1zio041cBn45tTeEU2z7/d0NjoQ CcfUoGyxJMMZEJRm13kznkDrUB/0XUUUD2gwu1Lyi5KVsfVyHv/o+OC+0hz7OA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=95d5a656a2b69e38461fcfba31e9f517648bd52a commit 95d5a656a2b69e38461fcfba31e9f517648bd52a Author: Kristof Provost AuthorDate: 2022-09-08 16:34:12 +0000 Commit: Kristof Provost CommitDate: 2022-09-12 07:32:02 +0000 pf tests: syncookie limits test Test that we can successfuly set syncookie high/low watermarks for very low or very high state limits. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D36498 --- tests/sys/netpfil/pf/syncookie.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/sys/netpfil/pf/syncookie.sh b/tests/sys/netpfil/pf/syncookie.sh index d85beac1a4d1..36d80b82289b 100644 --- a/tests/sys/netpfil/pf/syncookie.sh +++ b/tests/sys/netpfil/pf/syncookie.sh @@ -217,10 +217,43 @@ adaptive_cleanup() pft_cleanup } +atf_test_case "limits" "cleanup" +limits_head() +{ + atf_set descr 'Ensure limit calculation works for low or high state limits' + atf_set require.user root +} + +limits_body() +{ + pft_init + + vnet_mkjail alcatraz + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set limit states 1" \ + "set syncookies adaptive (start 10%%, end 5%%)" \ + "pass in" \ + "pass out" + + pft_set_rules alcatraz \ + "set limit states 326000000" \ + "set syncookies adaptive (start 10%%, end 5%%)" \ + "pass in" \ + "pass out" +} + +limits_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" atf_add_test_case "forward" atf_add_test_case "nostate" atf_add_test_case "adaptive" + atf_add_test_case "limits" }