From nobody Mon Jan 15 13:04:24 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 4TDC5h2Q1Mz56tmr; Mon, 15 Jan 2024 13:04:24 +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 4TDC5h1yGSz4VBN; Mon, 15 Jan 2024 13:04:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705323864; 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=2acJHeV7CLMjz2pw7/VAKloJEWsd8zJyGirH3Db93p8=; b=xCZ6MHpDcWu8WbLr4AxKJjxUJ7B9BSsrVNZRdX5gLSI5kO67dnxPtj5AdxcJqfMUf8fYOB znbOi3iqHu9L15Yx9pH7TDpdoJMVGg78waZTTfK3zbZBZnJh8UKMZp1gj5+UcGadL3Iptm sBnrgtyXqBfPNlb5cW1sMWEqmCtHtgHRgv6FGZTNy4AZNo5XMxPBTkfIQL2+ZRoK2F9rzR dLXdpbmQDds0p3o6Du98yDFrrTgnJ/HHWP2CjS461LiL55POGSJGbTrm8AebmeNYXIldA4 kjVY8Mr42kvjJa1VEeYMHR2YzzuUhNq/YqAqkpWshNt47qxA9GfRPEf7NDqJuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705323864; 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=2acJHeV7CLMjz2pw7/VAKloJEWsd8zJyGirH3Db93p8=; b=UG8yHzytjD+H7ibL1E80yh3TJ1FDtwSvhCIyHYr7ZbjxWVfu3CQYHtwvhWtX0btK4T8XWa SLAHvp1c1xW62wmQaYVpQDjuXVycsF1Uh9hOTXXJLYe8YrTU99OtRv3FSU1qDj7hNcn0CQ iqAKffCvw6FIYGBLxS8XyVlwi8gR8Jb8ncQsGe46Ynm3sjEPvTPNQnAQyAHIZzNtCjAbth FkTYeQ2TjkKVezgLSx6onORwvDopXVgyQd+ATlvA26uWr1tQW5khJLZ4q/RC3AwMpZVTAt o5YoTa298lbEVCfaK2pKSU2tSxVVDuUnI3SOpoekKt7gTi84zzzCseueLcnrzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705323864; a=rsa-sha256; cv=none; b=JZgKLjaYKBl74+AiiVPTWWsdWMuKY3cPpszrH3XebG3Luzwoo7NC5ue+M2NOXtGkxujk1A 52HAzpYNmk64h8s+/2B9ERDEK3QfdmMlUiC8oOx3kPez2bOu0spgk+87JH4CT+tSUwqNal ExzZRnS7iLdZpY0g/MV6XFi9oKuUf8dgsw7acJRif/G52SpQcQKu3xxoOJgx5silRx9EQt TAp96GUpa3rZAdnXLxsF7RxcvS4pVCJSJ1LSrjas7cZzCQxMezMLN9oXbbMWqr73yjQ48v zmaI1ip3xAyAr5Wz9cVoxfQSp8FfxLyPmZCMDm8Ic+2Mp79YswxLh5mWi4F/cA== 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 4TDC5h11L4zxxD; Mon, 15 Jan 2024 13:04:24 +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 40FD4Ouj074891; Mon, 15 Jan 2024 13:04:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40FD4OPV074888; Mon, 15 Jan 2024 13:04:24 GMT (envelope-from git) Date: Mon, 15 Jan 2024 13:04:24 GMT Message-Id: <202401151304.40FD4OPV074888@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: 24c0058a9b59 - main - pf tests: test reassembly with dummynet 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: 24c0058a9b594bcc4f207924ca60d891c87fdfde Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=24c0058a9b594bcc4f207924ca60d891c87fdfde commit 24c0058a9b594bcc4f207924ca60d891c87fdfde Author: Kristof Provost AuthorDate: 2024-01-12 13:15:42 +0000 Commit: Kristof Provost CommitDate: 2024-01-15 13:02:02 +0000 pf tests: test reassembly with dummynet Ensure that if we pass packets through a dummynet pipe we still reassemble as expected. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/fragmentation_pass.sh | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/tests/sys/netpfil/pf/fragmentation_pass.sh b/tests/sys/netpfil/pf/fragmentation_pass.sh index 5e92bb2d9a97..737977bfd9cf 100644 --- a/tests/sys/netpfil/pf/fragmentation_pass.sh +++ b/tests/sys/netpfil/pf/fragmentation_pass.sh @@ -468,6 +468,44 @@ reassemble_slowpath_cleanup() pft_cleanup } +atf_test_case "dummynet" "cleanup" +dummynet_head() +{ + atf_set descr 'dummynet + reassembly test' + atf_set require.user root +} + +dummynet_body() +{ + pft_init + dummynet_init + + epair=$(vnet_mkepair) + vnet_mkjail alcatraz ${epair}a + + ifconfig ${epair}b inet 192.0.2.1/24 up + jexec alcatraz ifconfig ${epair}a 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 192.0.2.2 + + jexec alcatraz dnctl pipe 1 config bw 600Byte/s + jexec alcatraz dnctl pipe 2 config bw 700Byte/s + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set reassemble yes" \ + "block" \ + "pass inet proto icmp all icmp-type echoreq dnpipe (1, 2)" + + atf_check -s exit:0 -o ignore ping -s 2000 -c 1 192.0.2.2 +} + +dummynet_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "too_many_fragments" @@ -479,4 +517,5 @@ atf_init_test_cases() atf_add_test_case "reassemble" atf_add_test_case "no_df" atf_add_test_case "reassemble_slowpath" + atf_add_test_case "dummynet" }