From nobody Sun Sep 1 15:06:09 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 4WxZw16DD2z5VLJv; Sun, 01 Sep 2024 15:06:09 +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 4WxZw14lgmz4YQ9; Sun, 1 Sep 2024 15:06:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725203169; 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=B9xH8rGydmHQJxiQd4lcHzsRmer0n9qQEIp40Alp38Y=; b=jY3+uPVqNu7YNElcoGxtN4HR0JQsCkmhGe+K8GEgrK0P1c9/nhyt4cBdw6BBDHv4uzOK3M 8CXs0dERtAsxQ2Rw7zgduOD8A9gDWZelEsPuuD2twRyFUHMIP94+IR/Y86ORpYhjP8kRP1 e988kAw+u+Wu7+KGWug86FZvK94qIqwc/IxwH9PkP6+086mfoApzN1nh08v5zxJpHv1nXQ BmPgE9rc6oKkC4fYDHa+NzdsgXIevgeT9PxkERQPrh3vgNE9jqlyXZPNT3C2NTIUIqzd1t sAfsh/O0a5z88+KpSaq2xrxbIb3/umH9iDVQdt8TvvaMKtAsYDLzqr3E2mxZeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725203169; a=rsa-sha256; cv=none; b=k/+2M7Cjr7f2zZ18bacSjoEn49+hSsJrlTsYAyU2wuiibbYa5iP4+/d0MkBu0h6yW5/Ms2 5F8Q54Tnki5mG0KjPY8habM+1dzzOoRGXhjLS0j5Jr34AK5A+IHlKFygGjyJvb9xXafPu4 SvjzLjbqjvweQ/Qela2mOK5ogl9PfXXdRWfjBN0IiJwDG/D7QzPGyu3NYhCtj5F9OTaNSc 28mjlrMUyll+lINf4tA7YHSZQ2mXVAy1yu1W8BAtFtSlw/kYve1aWeJCi2xpNW9c3Yn1q9 z5cYysQIeSjh8u/UIqRUKcJ7Lnl/iNojakUWKeu0cUMPRFNieWewA/2QrUVCiQ== 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=1725203169; 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=B9xH8rGydmHQJxiQd4lcHzsRmer0n9qQEIp40Alp38Y=; b=fcMGvs5Ztv3CCTmZlMZ4Wk1sCXomrGrieZ2Ffd+hOv6o5TGM2GXRhEbA/vT12UrkrMV4Ig CaFpVqaNzQp7zpJkcINrXYQPgWCijro9wjuexBC6RT8cDcpLwoTW45xuvkhUC1GycnLlIH 6vMiwpkvsQ2fPVNBTZlyiHhpQHkCwwczvuuwzv8Y7+hJoxkP0VmHk+I7G/Hk+e9k3SE0to APvsD3HG+mXK+uSua8cKSX0ahnM1kNeNR59bGlj1jnwbcqe51gb3U5ZOSiyQskDFeLKAk5 aHVDko89fjMsJPo8wadpUd864kjjLZWFMPKjeE4O6r9v8Ew/W+0v3WYp7LMrFw== 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 4WxZw13pKDzZ61; Sun, 1 Sep 2024 15:06:09 +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 481F69tG002532; Sun, 1 Sep 2024 15:06:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 481F693e002529; Sun, 1 Sep 2024 15:06:09 GMT (envelope-from git) Date: Sun, 1 Sep 2024 15:06:09 GMT Message-Id: <202409011506.481F693e002529@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: d154dc21130b - main - 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/main X-Git-Reftype: branch X-Git-Commit: d154dc21130b607d7903f276dd6d463b990f33f7 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d154dc21130b607d7903f276dd6d463b990f33f7 commit d154dc21130b607d7903f276dd6d463b990f33f7 Author: Kristof Provost AuthorDate: 2024-08-26 13:02:22 +0000 Commit: Kristof Provost CommitDate: 2024-09-01 15:05:28 +0000 pf tests: ensure that neighbour discovery works as expected Also check repeated calls. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- 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" }