From nobody Tue Jan 16 08:52:02 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 4TDjS33dmnz57B7F; Tue, 16 Jan 2024 08:52:03 +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 4TDjS26XBgz4Px5; Tue, 16 Jan 2024 08:52:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705395123; 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=AIqiwUEMLs2BTQAW5dd/E8Dmth52ULzaTOe+ttDFHLw=; b=AkO5CIJRP6KwwG55Pg8pAwxmj9kDUsO5lsutkPqrNb8/4e0M93CtiQiUQjl6846o2zoxul CfXlFxFuKu+YSfWY2UlmILZXvGaoEKcfzyphhJrF0NNCOf7uESeDoGCKYRDjwCtCcn4Nzi rYhFtNcgRVAVHvU6rwDmtd2ZUUCYv9tvxY3XiXNHUOmS9uDVoI4jB21pV2raz5QPWl/Ubl WDOTScokuYkS8RL0gxVqoDnZdwPfZ2vJ8juwpLl9VViBZ9S0S3X316RjJjdWUcqACl0C3q Pkerb+fNWcI8qbxoTnDvQU1Ask9kyAK761cdQA2+n9pF80oBZ59ZR+sCEWu+Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705395123; 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=AIqiwUEMLs2BTQAW5dd/E8Dmth52ULzaTOe+ttDFHLw=; b=bZE5IzqXqCOWRInZDQaU0qePKw7KFeajFO6BCSy99IrjEXKW3KFhldUoAf2MES1ABmLBO8 cJH2D0O9CrgSx/pa99nVKWHC0NpAs1dpzf9eZZ4eauYvKwv4FH7aFYghu8KfQ4YIY2Q9Fc sOZpekm6bWussxWgfmEdYzEwUjNTqNOhYVyPNQoJEvp9c14m/Y9PFVJTB+gV01EyHyExgk uLjBZ3RrEZNvZf8qtKjRM9Muk1dbv0EvF5gYVp4gPLi4eI0QyH+vLAUQaMUeOu6HNC5IUJ E2XYuuysmm4kS1K58ALfCbFZyNfsjlB0Zn6atUGIA4ArIZgNxOWaBDESOs5djg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705395123; a=rsa-sha256; cv=none; b=TZp1rdT0QdRq4Jo6vzQtZ48p0Ogo2TpbwvXkB/oiP4O0KekdmBOSu0YOL7AvlJHgUrrnQC kgiBXU6ra+bY3mduwkXdt4htRIbisAS9+vgjuebrRjEBDrkzHZUNFomZN6kw0lZPTMMbzV cyxBMXwa27khfHhf6QQOoz0VpsPTQXuyTy4+M8AXMEVXz+w8wxtkvHw8vlUedzbusuT8d+ 62n+ugpLJX8c/xsCyGNQAqT4uMdfiAQQy6Yvu3RB8BQKCgRjHWOL+EUsPGtgB4OXmOe9Ki 4QLl5wWVH44LFDhUkxdAJ4jUIoLEuz8xh/EO5F7xbcdC72H4z7dwAB/nghsvpQ== 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 4TDjS25dF3zZLf; Tue, 16 Jan 2024 08:52:02 +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 40G8q2GP077338; Tue, 16 Jan 2024 08:52:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40G8q2Pw077335; Tue, 16 Jan 2024 08:52:02 GMT (envelope-from git) Date: Tue, 16 Jan 2024 08:52:02 GMT Message-Id: <202401160852.40G8q2Pw077335@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: 34276498fae8 - main - pf tests: verify pflow over IPv6 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: 34276498fae8b41ca1d8944d466cd79aa47fadfb Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=34276498fae8b41ca1d8944d466cd79aa47fadfb commit 34276498fae8b41ca1d8944d466cd79aa47fadfb Author: Kristof Provost AuthorDate: 2023-12-13 17:12:08 +0000 Commit: Kristof Provost CommitDate: 2024-01-16 08:45:55 +0000 pf tests: verify pflow over IPv6 Test that we can send netflow information over IPv6. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43115 --- tests/sys/netpfil/pf/pflow.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/tests/sys/netpfil/pf/pflow.sh b/tests/sys/netpfil/pf/pflow.sh index 12d194d84c14..4bed49ef6f76 100644 --- a/tests/sys/netpfil/pf/pflow.sh +++ b/tests/sys/netpfil/pf/pflow.sh @@ -141,8 +141,51 @@ state_defaults_cleanup() pft_cleanup } +atf_test_case "v6" "cleanup" +v6_head() +{ + atf_set descr 'Test pflow over IPv6' + atf_set require.user root + atf_set require.progs scapy +} + +v6_body() +{ + pflow_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -6 -c 1 2001:db8::1 + + pflow=$(jexec alcatraz pflowctl -c ) + # Note proto 10, because there's no IPv6 information in v5 + jexec alcatraz pflowctl -s ${pflow} dst [2001:db8::2]:2055 proto 10 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "set state-defaults pflow" \ + "pass" + + ping -6 -c 1 2001:db8::1 + + atf_check -o match:"^v=10.*" \ + $(atf_get_srcdir)/pft_read_ipfix.py --recvif ${epair}a --port 2055 +} + +v6_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" atf_add_test_case "state_defaults" + atf_add_test_case "v6" }