From nobody Thu May 18 16:01:25 2023 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 4QMZTd3Qggz4BkN2; Thu, 18 May 2023 16:01:25 +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 4QMZTd2yqhz4Pkl; Thu, 18 May 2023 16:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684425685; 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=RbeUl0xkbxRRZcd1mUIGcW/FEjhPvf10Ewe4vM2wRqE=; b=w5EGZ/WroGRkg9E0COnD7CXv9lRlle5N5bjpJv9xvUnjMm4ylDYKfFv4MVyEWy5n9XMZfh SepNE+9LVpvmEiG9Y+zzOAMKE6D0R698eDRHIKaarawuogWKALbXGsIu7n3f/81yaIZMLk aR5Sr2C9qtz7prOfdLmwe2cdgvQDpXIs9+J/vXbWilOaqtdPoIyWx4/kOjIm/E3DBimE43 scM0/cTAlM3SK5kLdi/DZ78l+nfBawyX9JGreLhmTHerfW1fq133yuVDNIm97amUO07CR5 3Jjmk/jH/jA0Ygmo1w64D6CW72qT7tTAfiy+dVQe/Pg5SGKap08uuvVpJ9Boig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684425685; 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=RbeUl0xkbxRRZcd1mUIGcW/FEjhPvf10Ewe4vM2wRqE=; b=L7ITFgU+ZpTkEu2HPmC0UQ7UEki+/9U9tcGjHZa1hWE9q9fNqQx7GpnGOfZ8mEeHOb3rCa qgB5CXCrCtS21E01T0k4S/RaBJw4HPYAMne25oT6wXH+aT/5jR2NQU2nhaOP9Q82n1BOXs RqrcVBNjnQZeYNznNKWco0hJV7jBvV+PyoK1brZDl/xirn8oiuTqOxz9psB4nez1Os3L0b 0zQxfK91FxblCfGKvaQQiKc+//sY5+hX2iGJhtwRehKDE/z54mFzW32atTactw+pvwMsIf RwP4V3iZQTmjGOdhWDyOHg907/DDB5QOvkQyW4qYYJ4Dq3sWgcCTFWgY9PjreA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684425685; a=rsa-sha256; cv=none; b=oZOBzVTguDI+Raefz5bFGppyCXxNDPQz7YKCo/gTBfkq5zCFoiBczMO6gtRowHxgdPl2ZT +uZnZ9CgclZ1Tdq4YMwcx87oRnrSyS07QfINJGdlce+jqPHscfj+x2MJxBW1adv0F/ElnY +ZnMsiyJKXywKtn13MgMnJvJI0Q6FGZqXdtqZWO6039LZPbyw8vsH7VWcHmuDthkgvIKo8 7Qp71oYADuXB7vQlNYTOz5O7g2FCZnvDzbfTue90XG/vFvE0E7qg4KK81suuDoZt5qXr5f iLccflLdJWtHgOq2zL6vYWw13gMCLbftp7uE34dM4bF21MjCrsCTgD4GkZ2Cng== 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 4QMZTd236xzs2P; Thu, 18 May 2023 16:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34IG1P3e013718; Thu, 18 May 2023 16:01:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34IG1Psa013717; Thu, 18 May 2023 16:01:25 GMT (envelope-from git) Date: Thu, 18 May 2023 16:01:25 GMT Message-Id: <202305181601.34IG1Psa013717@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: 33ff01cebc02 - main - carp tests: test unicast carp via link-local addresses 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: 33ff01cebc0209f59239ded324906cfdfe986341 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=33ff01cebc0209f59239ded324906cfdfe986341 commit 33ff01cebc0209f59239ded324906cfdfe986341 Author: Kristof Provost AuthorDate: 2023-05-18 14:43:46 +0000 Commit: Kristof Provost CommitDate: 2023-05-18 15:47:04 +0000 carp tests: test unicast carp via link-local addresses Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netinet/carp.sh | 61 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index fba69800670a..7508a6996fcd 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -272,6 +272,66 @@ unicast_v6_cleanup() vnet_cleanup } +atf_test_case "unicast_ll_v6" "cleanup" +unicast_ll_v6_head() +{ + atf_set descr 'Unicast CARP test (IPv6, link-local)' + atf_set require.user root +} + +unicast_ll_v6_body() +{ + carp_init + + bridge=$(vnet_mkbridge) + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + + vnet_mkjail carp_uni_v6_one ${bridge} ${epair_one}a ${epair_two}a + vnet_mkjail carp_uni_v6_two ${epair_one}b + vnet_mkjail carp_uni_v6_three ${epair_two}b + + jexec carp_uni_v6_one ifconfig ${bridge} addm ${epair_one}a \ + addm ${epair_two}a + jexec carp_uni_v6_one ifconfig ${epair_one}a up + jexec carp_uni_v6_one ifconfig ${epair_two}a up + jexec carp_uni_v6_one ifconfig ${bridge} inet6 2001:db8::0:4/64 up \ + no_dad + jexec carp_uni_v6_one ifconfig ${bridge} inet6 alias 2001:db8:1::1/64 \ + no_dad up + + jexec carp_uni_v6_two ifconfig ${epair_one}b inet6 2001:db8:1::2/64 \ + no_dad up + jexec carp_uni_v6_three ifconfig ${epair_two}b inet6 2001:db8:1::3/64 \ + no_dad up + + ll_one=$(jexec carp_uni_v6_two ifconfig ${epair_one}b | awk "/ .*%${epair_one}b.* / { print \$2 }" | cut -d % -f 1) + ll_two=$(jexec carp_uni_v6_three ifconfig ${epair_two}b | awk "/ .*%${epair_two}b.* / { print \$2 }" | cut -d % -f 1) + + jexec carp_uni_v6_two ifconfig ${epair_one}b inet6 add vhid 1 \ + peer6 ${ll_two} \ + 2001:db8::0:1/64 + jexec carp_uni_v6_three ifconfig ${epair_two}b inet6 add vhid 1 \ + peer6 ${ll_one} \ + 2001:db8::0:1/64 + + # Sanity check + atf_check -s exit:0 -o ignore jexec carp_uni_v6_two \ + ping -6 -c 1 2001:db8:1::3 + + wait_for_carp carp_uni_v6_two ${epair_one}b \ + carp_uni_v6_three ${epair_two}b + + atf_check -s exit:0 -o ignore jexec carp_uni_v6_one \ + ping -6 -c 3 2001:db8::0:1 + +} + +unicast_ll_v6_cleanup() +{ + vnet_cleanup +} + atf_test_case "negative_demotion" "cleanup" negative_demotion_head() { @@ -412,6 +472,7 @@ atf_init_test_cases() atf_add_test_case "unicast_v4" atf_add_test_case "basic_v6" atf_add_test_case "unicast_v6" + atf_add_test_case "unicast_ll_v6" atf_add_test_case "negative_demotion" atf_add_test_case "nd6_ns_source_mac" atf_add_test_case "switch"