From nobody Tue Dec 17 10:07:54 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 4YCCDV57jgz5h0nP; Tue, 17 Dec 2024 10:07:54 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YCCDV3Fvmz49Y9; Tue, 17 Dec 2024 10:07:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430074; 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=OdzSmr7b2cavrCOwJbCfVE4KU/E7A1zQQXfpV9xPQic=; b=v3Q/vzn3jocUFOsS9gVfLSX9wZdwXbjQyTkPhNraOr/gLu+8Xu7q/tt44WHRECkc/skM21 AJTmi/zu7Bk7ySq3Y8RKqS4toC9hJCLKdzYKxZmNTfOapmaFquDPhcMWDb4cSRn941EkVM Zxd/IvG9VGRRgrOGlPX5HR30TX+BiA6wpytgdyiVWeDep/76VsEssfsWLOYeFFwaL5vBZo rVlqpCwVPCZSlUtMW0le75Nr/zEVNDMz/hYaL1AwsVtn0NXM0ZhsTHLwA6CFsaGxUszaZC N5IikkM7fVoTlcE4gvHZMl7gZBs8zMUAJjqLbYaL5d9hxCTpfifrH57XQnmvMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430074; 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=OdzSmr7b2cavrCOwJbCfVE4KU/E7A1zQQXfpV9xPQic=; b=cZ8XFTnpYKwHpa46ncVukOJDmvHsTVVN2w7iuQx7IlrIGJq9p8q8A0MMlgHcWqaUID1XW7 gzJaAez72jE4LZj6uAD8CO0z7SK/I6jByxkji6COhLjQICKHu6sVTyj7tT9TwOX/XqNdSi AZhi3Ty/zLi+/SfXF1x9r0aAWJD200/U2ZWaytsfqUBjN0gfkSPcudTUChjxibo80ILxdu F1jtrSX69MWSBhetPfQcq7Rgpkjawd/DUfhfBLvm/M59B4RkDPmKx4Mdng4Uyz40hxkghT 0Vh0JjM3RuTmvHd9K1egFRVSoLzc2KSBnvnPdrCSmDmuiV45wdc4PpZb5Xlx6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734430074; a=rsa-sha256; cv=none; b=RqFkfbkgwn9TR+sUf8hHbw05iAqfQVgzv6auXeEeCFVOpBnHPh4MBO9FlKhg9wh5RDrDGv ld9jT/szR314wspKPU90RJZLMEMSlR3Yb64wiwesusCsSCiXbyHUg1aThC2EILE4juBodz a98WtFI42qvyfvdq9JrjR3NfR+osh4cz2mtZfQ6XMpkpcNOXmegvC4cWw8Hkhz4ML8spt7 rOieEZgDxgxKxrkNoMsHCJrWy7dcvbLRSnXoCJripzlNmP4Rbzms9SQZI5WjnSPY+4tTUE vQsBIDRGJTdZS0fcEsexx0xv4hgckR4nGjucVzDZYjsQBvPWPglIarmzkDL3jw== 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 4YCCDV2t7mzJXD; Tue, 17 Dec 2024 10:07:54 +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 4BHA7sgn023938; Tue, 17 Dec 2024 10:07:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BHA7sLc023935; Tue, 17 Dec 2024 10:07:54 GMT (envelope-from git) Date: Tue, 17 Dec 2024 10:07:54 GMT Message-Id: <202412171007.4BHA7sLc023935@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: a43589dcbf8b - main - pf tests: add an SCTP test case for nat64 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: a43589dcbf8b973f46d251e5841b122f0a3c6244 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a43589dcbf8b973f46d251e5841b122f0a3c6244 commit a43589dcbf8b973f46d251e5841b122f0a3c6244 Author: Kristof Provost AuthorDate: 2024-11-07 08:48:37 +0000 Commit: Kristof Provost CommitDate: 2024-12-17 10:07:14 +0000 pf tests: add an SCTP test case for nat64 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47794 --- tests/sys/netpfil/pf/nat64.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh index 1f87e7a1853b..3e04dc6e7bc0 100644 --- a/tests/sys/netpfil/pf/nat64.sh +++ b/tests/sys/netpfil/pf/nat64.sh @@ -141,9 +141,43 @@ udp_cleanup() pft_cleanup } +atf_test_case "sctp" "cleanup" +sctp_head() +{ + atf_set descr 'SCTP NAT64 test' + atf_set require.user root +} + +sctp_body() +{ + nat64_setup + if ! kldstat -q -m sctp; then + atf_skip "This test requires SCTP" + fi + + echo "foo" | jexec dst nc --sctp -N -l 1234 & + + # Sanity check & delay for nc startup + atf_check -s exit:0 -o ignore \ + ping6 -c 1 64:ff9b::192.0.2.2 + + rcv=$(echo bar | nc --sctp -w 3 -6 64:ff9b::c000:202 1234) + if [ "${rcv}" != "foo" ]; + then + echo "rcv=${rcv}" + atf_fail "Failed to connect to SCTP server" + fi +} + +sctp_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "icmp_echo" atf_add_test_case "tcp" atf_add_test_case "udp" + atf_add_test_case "sctp" }