From nobody Thu Aug 15 11:06:32 2024 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 4Wl2PP2KpYz5TQdj; Thu, 15 Aug 2024 11:06:33 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wl2PP02rqz4qlC; Thu, 15 Aug 2024 11:06:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723719993; 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=cYpMFzdkYQo/jdogrvko7COgV1nXWAK1FnDv39jOtGk=; b=HKC+mU5DA9qYyEXjfC7nI35pSFvyRIxfjdqS9QOXI4FzEL07JrNACt2XfIwhp/JZW/1r0s 28qvpBsllHXSEsqJOrQL2bhXSr2bfIya3jwNG9FbNiafJ+UZaU70x34VkrB/sB6D30FSEU aMs86yg0rhrb5XAOvGOZwiDPhwavo6cEdbczn58DpNFaw3NMG5fEhn1zkNQFMVLW7Id7T9 GVNRIRhJgZRIZ/t9om1eKaKYqNfOOeiY3pcw+onCyup56p3NVewCM8/gj0irw8tLux+EDP b4CA7NipOLGK8Fve6rMdL2hVZBICnKhWFAamBUuGt1ZsppxsHse7TtKQhhVsxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723719993; a=rsa-sha256; cv=none; b=aWdF/o6/qLeSzxBXHO/lSuQDKD61E8Nb2HtmbS43dTZUoHAQXV0ti9z8Ih7jpFu3irZkcB GZqGykY9t8ws3pUQGAd4LMn1LYPyPARsusXc6+tEjQPOET0o8/uc2TP+MKb6WicUF431VJ siiow6khF1m3V9Kb5pOq9ynOiJU9hgyEt74lhH4Ta9SLvi6WDkRrGj1DE8tIFRGF8Cxwcv Dxms3ApXgeXWLIJUqFUQA+HBm5Gdl5/zSedfOBLshZga7J9OjPPE0cK/V2O/YkFlKy1JWa p6Wi+VW+smSrwZ+f7aZlDjo7XD7F8rY0HdRwTQr428VZYsDiXPAqDKMcSjS88g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723719993; 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=cYpMFzdkYQo/jdogrvko7COgV1nXWAK1FnDv39jOtGk=; b=qmKace9Nn1C8p+V+eb2XFXg6dwZlrRvi1RbRs/1QTjsSp/qeP0+aVRRPm7Xu6tz7gSxJkp ywhEHhfb14gE24Cme0SQmuYJziYrI4sfdedkwQdyWXy/fHoXQFLh/NqM2dWoAFQh+7HSmX hiJF8Gu2pT8GE0IJlOca2HBPwjUjpoNwP4WTSf1wpZ83fygQOALLstaWhbj4PcPqqwPGiC bHmVrpygeBl+/MsQoDwGtd/xz3t1YHe0S+UYMreJWta9H1cnI90S5b6t2ljpBPY4u6BP62 QMPvsr4IT3mQteyHr3py+guNEBN2BrUqKqw8JXGq0txATAR7iSG6+hqSud93gg== 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 4Wl2PN6ln0zKrf; Thu, 15 Aug 2024 11:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 47FB6Wx9070952; Thu, 15 Aug 2024 11:06:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47FB6WqQ070949; Thu, 15 Aug 2024 11:06:32 GMT (envelope-from git) Date: Thu, 15 Aug 2024 11:06:32 GMT Message-Id: <202408151106.47FB6WqQ070949@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: 9aeee9486a07 - main - pf tests: basic test for sticky-address configuration on rules 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/main X-Git-Reftype: branch X-Git-Commit: 9aeee9486a07078698d65f254d7b414abd96cfff Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9aeee9486a07078698d65f254d7b414abd96cfff commit 9aeee9486a07078698d65f254d7b414abd96cfff Author: Kristof Provost AuthorDate: 2024-08-15 09:10:09 +0000 Commit: Kristof Provost CommitDate: 2024-08-15 09:11:59 +0000 pf tests: basic test for sticky-address configuration on rules There was a bug in pf_handle_get_addr() where it confused the counter and pointer in the pf_addr_wrap.p union, causing panics. Test for this. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/route_to.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/sys/netpfil/pf/route_to.sh b/tests/sys/netpfil/pf/route_to.sh index 5f47cea39b01..305ca4c8eddd 100644 --- a/tests/sys/netpfil/pf/route_to.sh +++ b/tests/sys/netpfil/pf/route_to.sh @@ -786,6 +786,30 @@ dummynet_double_cleanup() pft_cleanup } +atf_test_case "sticky" "cleanup" +sticky_head() +{ + atf_set descr 'Set and retrieve a rule with sticky-address' + atf_set require.user root +} + +sticky_body() +{ + pft_init + + vnet_mkjail alcatraz + + pft_set_rules alcatraz \ + "pass in quick log on n_test_h_rtr route-to (n_srv_h_rtr ) sticky-address from any to keep state" + + jexec alcatraz pfctl -qvvsr +} + +sticky_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4" @@ -802,4 +826,5 @@ atf_init_test_cases() atf_add_test_case "ifbound_reply_to_rdr_dummynet" atf_add_test_case "dummynet_frag" atf_add_test_case "dummynet_double" + atf_add_test_case "sticky" }