From nobody Wed Sep 04 08:53:31 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 4WzGVg58CVz5TRk8; Wed, 04 Sep 2024 08:53:31 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WzGVg2gRvz4XgW; Wed, 4 Sep 2024 08:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725440011; 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=8uWEVAXTS1K+ru8nsVnHGE3L7ajpJUlJk/xiyo9qbl4=; b=AYrbzE+KaszFGtrq9clyFNkXAhHlGAtKKwXMXyeMX1IFdEEvQd9Rc/OF4LzaFd/5ghW5AX FODmiqbwCpkyqvGOOd1+lnE/F31DhVAFtylxpk06r24iSOkWvEsUeLaTRkufnM7I/n1TIq n10IwtjAPrmxXCoJnIghnSNBC6Ix1BuQIiKo3e42pd17LWAa3czSEVoHWCOaytgePDDR+s UQjYcyHZFxYk5l/b3JDyu7oquysBUUxl2Cg7yF1b2F9C/CiomCEprc7M/sshshkpjRYd0U 3+gL33srXYMmojr5HlGPyWN4S7O6KdTBP2gCla5Ac/oR9Pwui6NdhtVlDW0GPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725440011; a=rsa-sha256; cv=none; b=khBa+obo2SF+vsAUIfHfcvNSrAHMLgjvONrKRRR9Dafm+/Xn1yCLs0KYOyC2rT94G3lfH9 gYQIimJmcD363OVnAmTa1oUdcONybi5b9ihKgXTI0vYBPF9uBzGgMLrMVu5UnyA1slnVMg CkeuZ7EWBfGSYKHenoJdTT6tRjPqoqpCpoF0je8StYtc1xUWSHlgGZxIrtXjTyDp/SrRgm jHeLCH9FEnVOg6pnGjNLfunIhqcnr/+ADDCyJYknVtLkneBHp9oyMlvkX/xztM8C0ruRpf CRqQjK7aXZRMW05l+zmOZyl9gBMTI50R7302xYTG6RpSOLNHHPntyg3y8Dx9mA== 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=1725440011; 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=8uWEVAXTS1K+ru8nsVnHGE3L7ajpJUlJk/xiyo9qbl4=; b=mx5ELWSDbvv/JHboJI3TrLMJDah+srCQAYHtTIQLHfJQ2bqYDcAfz9yyK3SFm6PVdog6eL dnNXLyPToH0QQd9tOJEgVc10TS+LEHWTeTYOPifVMBLQOjei0f4RDGPnrLu2Q68yLvDR0F eUQ03WRdo1AyC3/wjjqSdR0fjnQ6rNZhzvkE6Kc2aOT52K7kD/BKp4fdbDVE9/Lv+L9G+p +KC+O0G11QrHEjSsS+rgVK8NVgtX9ymHUcwwPUVMsLTYJUxwS0s2gBrD4MZORX315efe70 i77RyCT+klo8t+hAm+rEVkTuKl17BnfCv94SG5GaB3FGawB2r7LOuSBx3D6JbA== 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 4WzGVg2HNNzJ2l; Wed, 4 Sep 2024 08:53:31 +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 4848rV7J005557; Wed, 4 Sep 2024 08:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4848rVKY005554; Wed, 4 Sep 2024 08:53:31 GMT (envelope-from git) Date: Wed, 4 Sep 2024 08:53:31 GMT Message-Id: <202409040853.4848rVKY005554@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: 2c76404c79ac - stable/13 - pf tests: ensure that neighbour discovery works as expected 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c76404c79ac67d8d3df1d11881dce9c2fa44cca Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c76404c79ac67d8d3df1d11881dce9c2fa44cca commit 2c76404c79ac67d8d3df1d11881dce9c2fa44cca Author: Kristof Provost AuthorDate: 2024-08-26 13:02:22 +0000 Commit: Kristof Provost CommitDate: 2024-09-04 08:53:06 +0000 pf tests: ensure that neighbour discovery works as expected Also check repeated calls. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d154dc21130b607d7903f276dd6d463b990f33f7) --- tests/sys/netpfil/pf/icmp6.sh | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/sys/netpfil/pf/icmp6.sh b/tests/sys/netpfil/pf/icmp6.sh index b9b60a484afc..eb286e23ef4c 100644 --- a/tests/sys/netpfil/pf/icmp6.sh +++ b/tests/sys/netpfil/pf/icmp6.sh @@ -149,8 +149,56 @@ ttl_exceeded_cleanup() pft_cleanup } +atf_test_case "repeat" "cleanup" +repeat_head() +{ + atf_set descr 'Ensure that repeated NDs work' + atf_set require.user root + atf_set require.progs ndisc6 +} + +repeat_body() +{ + pft_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 -c 1 2001:db8::1 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "block all" \ + "pass quick inet6 proto ipv6-icmp all icmp6-type neighbrsol keep state (if-bound) ridentifier 1000000107" + + jexec alcatraz pfctl -x loud + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv + + atf_check -s exit:0 -o ignore \ + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv + atf_check -s exit:0 -o ignore \ + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv + atf_check -s exit:0 -o ignore \ + ndisc6 -m -n -r 1 2001:db8::1 ${epair}a + jexec alcatraz pfctl -ss -vv +} + +repeat_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "zero_id" atf_add_test_case "ttl_exceeded" + atf_add_test_case "repeat" }