From nobody Tue Dec 17 10:07:53 2024 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 4YCCDT2v9Fz5h0Yh; Tue, 17 Dec 2024 10:07:53 +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 4YCCDT1y9zz49kZ; Tue, 17 Dec 2024 10:07:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430073; 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=jlJoQ+elTRS+ZbCVVSGZ7077IcN0OW2rqSfSC8YsuVs=; b=qzk3Dl2gnvHpu6r/4HLLX9Dcjt78hZSU0zU3h0Z9SWJdEW1CYZN5WR96Vi8+25RBXIfB1Y 3tOB4xm7XZNSDn1dgtPhL+FOgOEW1VUyePacU/6E34vmOk39ZBrNAnZfXgixZ2f1lhRhwf l9waD2qLNvjj+LnqNaakEhYpz79Rvznx551n38mMh7VHtRNBL1+SkjStAvGmShbR6feC08 2MaaYgTMPZpqptZWSWVy4/DQHBBiyaQFNHQtIC38O5nDw9nQ1yX9mGe3aeWX097aSSFhPm doDRqw2WsWFBWe8FUYEMxbpD7plZ3JylbufS88xWkj84c15nIby0cW7KVoYJ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734430073; 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=jlJoQ+elTRS+ZbCVVSGZ7077IcN0OW2rqSfSC8YsuVs=; b=ZfsQg5vkrj+k2+JMymUwsYjo+zRcf85s9Z/NZJt2EMUR4gZslmhOu0G4xWMTsoIfF+UP/4 1HMjZ7tClbaSbNzyBip3+12DbXsJEBDzGPISpbCnUs4KZk84d7RHM8EXfMgfq/Jy6yrIv4 GsEPDoYXlN35vTLrBTV7HaQzVgB1RO980Mrst1vTQ7LeZ5dgqAIYyTGIhzuI64O4V7efld HoWJ6aMqoquysktr6X3PGmSroRNGOK6SJfNJZ6k1xroRT1oKKbaWkFq+Ylq6dZWxcuX9Fq DdiHbfwa8u1W7s6y4wv2wBfCQBZTPD7P88dl+a7ORhVvSDcg8oCMfErFC4Rppw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734430073; a=rsa-sha256; cv=none; b=JG33Y0c3kYZvzcBAlvBTY9X5fIy1fySGLBnICe4yIJK5QtGX/siFWa12GBemCnI8K+0FDU S43/+S+ZBWdnwdJS5Y3FGmA0eGRuDXaGKyuHckhpNcXd5maP8WrxvrikiHacSkYlY/pgZ/ GD/Nr0CXB5Eng4GJh40ayhLrUE0wY+WG8AUHGBEG2zbDaGszGAO/AFnb08pJq07b872CDV 25/gOjK4V3I8JHwSDxCL0fbwxCS1Lza+eWUKzCdZ88GhK5WHejrsnWChmUxA7m0SVsOGCu 6yjINpIaE1KpctTaf4XEOndzi7nkVX3LadaVAWWcg+gEbH5NRjGpvTJqPE8cvg== 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 4YCCDT1YfnzJjk; Tue, 17 Dec 2024 10:07:53 +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 4BHA7rTG023884; Tue, 17 Dec 2024 10:07:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BHA7rFQ023880; Tue, 17 Dec 2024 10:07:53 GMT (envelope-from git) Date: Tue, 17 Dec 2024 10:07:53 GMT Message-Id: <202412171007.4BHA7rFQ023880@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: 7e309356b009 - main - pf tests: add a UDP test case for nat64 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: 7e309356b009e9b7136614150aaa3790334146ba Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=7e309356b009e9b7136614150aaa3790334146ba commit 7e309356b009e9b7136614150aaa3790334146ba Author: Kristof Provost AuthorDate: 2024-10-30 13:19:49 +0000 Commit: Kristof Provost CommitDate: 2024-12-17 10:07:14 +0000 pf tests: add a UDP test case for nat64 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47793 --- tests/sys/netpfil/pf/nat64.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/sys/netpfil/pf/nat64.sh b/tests/sys/netpfil/pf/nat64.sh index 4c365be0d309..1f87e7a1853b 100644 --- a/tests/sys/netpfil/pf/nat64.sh +++ b/tests/sys/netpfil/pf/nat64.sh @@ -111,8 +111,39 @@ tcp_cleanup() pft_cleanup } +atf_test_case "udp" "cleanup" +udp_head() +{ + atf_set descr 'UDP NAT64 test' + atf_set require.user root +} + +udp_body() +{ + nat64_setup + + echo "foo" | jexec dst nc -u -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 -w 3 -6 -u 64:ff9b::c000:202 1234) + if [ "${rcv}" != "foo" ]; + then + echo "rcv=${rcv}" + atf_fail "Failed to connect to UDP server" + fi +} + +udp_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "icmp_echo" atf_add_test_case "tcp" + atf_add_test_case "udp" }