From nobody Mon Oct 02 09:33:29 2023 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 4RzbNn3TFjz4vrKS; Mon, 2 Oct 2023 09:33:29 +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 4RzbNn2g9qz4Sdy; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1696239209; 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=GTYDly9RnXnbRTHVgm/bioyhgKUcspu1bOR7E/bBqIw=; b=topBRKYN7BxzGPj8aApYk4Xw1BdmwTYEp3nItcnNAp/Mv5M+GS2FS4b0VGS/CVr+SI5RcB 6QFwkpcuRZYK3ZQU+WnJJuVQYUQCusDWSxErAjCHu7nTV63/wTYXEnHeYhK2Azf2ggBYc/ QoPFePvyXAyj1NhZSnDZy4bjF8pjOtupwJvI9//FFpmAYsg+uBMHfJHXMks+Li4efJYOoo Gl1vG8HIATc0vpTEim3VTPfmqCT+jBpIhSmwk1Awy4oox2G8ZMujhp9CwieBtnzyQJPje0 J4eMNIz1mq0qr/NZjFfRejdQ3vNeCzOUFqlCOEI6l/x7rE0hh0S0JAUxe/83bQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1696239209; a=rsa-sha256; cv=none; b=owlXc4fUsGWVJncHk7iUp+0h1LxNe8WttPPnREh6n0E+Jnh08ZT4lJPZd4wlJkq0p9eDLs zgVWOeiDyf+F5KitIi8mah4nXXCNZUwQDpHaGS5U3kSrFyOID197SNGqQB4e9UxRUXAqMM LWv3lgsBp5UQirbOXN5xYAymUUgCwd+yPgvaK6+hh8inmkCX0D0bZiLoIWpYNlAefj8e79 r9H2ItnM0p4ip+jjeNoArg2UvQPMrqG7kbCCn14NprTY/Wl6eki/v4fFKg8i3VR3scc0Fa EU/CJcvgaSFav92g4LGSQW7D5wt5lBhRzTiMsdTOn549MafSk0c4hefEOzl2Xg== 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=1696239209; 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=GTYDly9RnXnbRTHVgm/bioyhgKUcspu1bOR7E/bBqIw=; b=eC6TsbHAI3NA1trOMkin7l8pRcN6CIRnUXqnnPmXxFVJlhKiobeyx6e0JVP1zIA/MlXWjq xhQkpmEN4mU14duVwftb0GXTfnVHCQazvKzUd/V78KqIxBzOpjxHVsT7C+FaCn2c+ZvUh9 K3K3NvoCd5kF6h5zmCsDvVnadxi6Fl5Fd8Pr9jfpuP6eiDC0B02puYnvi4Bq9HUAYm4N6w CuPnqRjitvYuXl+5DNIznTzR/DUtpX3pASlsGZn3h8XWK4Rr6feaBlNpkt9GDsNBKRsMZ2 +kI0Lc7CC5YaTGEIfOyoehMzLwLjA4UcZ2G2s2rPd3aI6lj1N9FnUgxanLtYpw== 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 4RzbNn1T43z16Y9; Mon, 2 Oct 2023 09:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3929XT8V003337; Mon, 2 Oct 2023 09:33:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3929XTlq003334; Mon, 2 Oct 2023 09:33:29 GMT (envelope-from git) Date: Mon, 2 Oct 2023 09:33:29 GMT Message-Id: <202310020933.3929XTlq003334@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: a4f506a9a610 - stable/13 - pf tests: extend SCTP tests to test state removal through ASCONF 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: a4f506a9a61034c8bf1dae82e220a11a2c418a66 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a4f506a9a61034c8bf1dae82e220a11a2c418a66 commit a4f506a9a61034c8bf1dae82e220a11a2c418a66 Author: Kristof Provost AuthorDate: 2023-09-05 17:00:49 +0000 Commit: Kristof Provost CommitDate: 2023-10-02 08:51:44 +0000 pf tests: extend SCTP tests to test state removal through ASCONF pf can now mark shut down multihomed connections shutting down. Verify that pf does the right thing. MFC after: 3 weeks Sponsored by: Orange Business Services (cherry picked from commit 97340b68d18bbbdebf0f73ed900c5a33894061dd) --- tests/sys/netpfil/pf/sctp.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/sys/netpfil/pf/sctp.py b/tests/sys/netpfil/pf/sctp.py index b24d0c414ac8..5e6dca5dd64b 100644 --- a/tests/sys/netpfil/pf/sctp.py +++ b/tests/sys/netpfil/pf/sctp.py @@ -342,6 +342,24 @@ class TestSCTP(VnetTestTemplate): assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234", states) assert re.search(r"all sctp 192.0.2.10:.*192.0.2.3:1234", states) + # Now remove 192.0.2.1 as an address + client.bindx("192.0.2.1", False) + + # We can still communicate + try: + client.send(b"More data", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] =="More data" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Verify that state is closing + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 192.0.2.1:.*192.0.2.3:1234.*SHUTDOWN", states) + class TestSCTPv6(VnetTestTemplate): REQUIRED_MODULES = ["sctp", "pf"] TOPOLOGY = { @@ -440,3 +458,21 @@ class TestSCTPv6(VnetTestTemplate): states = ToolsHelper.get_output("/sbin/pfctl -ss") assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\]", states) assert re.search(r"all sctp 2001:db8::10\[.*2001:db8::3\[1234\]", states) + + # Now remove 2001:db8::1 as an address + client.bindx("2001:db8::1", False) + + # Wecan still communicate + try: + client.send(b"More data", 0) + rcvd = self.wait_object(srv_vnet.pipe, 5) + print(rcvd) + assert rcvd['ppid'] == 0 + assert rcvd['data'] == "More data" + finally: + # Debug output + ToolsHelper.print_output("/sbin/pfctl -ss -vv") + + # Verify that the state is closing + states = ToolsHelper.get_output("/sbin/pfctl -ss") + assert re.search(r"all sctp 2001:db8::1\[.*2001:db8::3\[1234\].*SHUTDOWN", states)