From nobody Mon Mar 20 14:14:26 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 4PgGvR1LqLz3ymx6; Mon, 20 Mar 2023 14:14:27 +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 4PgGvQ6xnnz3kJP; Mon, 20 Mar 2023 14:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679321667; 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=xrIJo6l0vk2Mpkh/4P57g3FzNrGLckA9anzChK0GWDM=; b=ajY3LKe3DcI5VHUJ1Jx1UijUIYV5sg2LU14JZuLOdP+l6xyoH6NosZIKh7nxxg3RhPaXe1 WJtZZ6qoh7TyeY66S7RBGz4a8qOylD9ldG6yDfszbkkNSmei3iRvoiX3sFjCFi3lm9/Y/D 7bh8sRqpywJVZaQKzT4d9v+m/BRSpa3HAU82VkGvFpC19i702l2qPJYEXoCzUM0C5/FMEz 4VMpGmYDHEAlrLJ+m3hc79PuedXFlsc98gnHPo50cA1DEjQXiXG+l+b0ofxnq/69fjMRWN JtRJzV3AJKMjsoHp06rWaFmez2pmwE2ZilpxgBEzA6WxawO3dxFbXWFy3d8DXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679321667; 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=xrIJo6l0vk2Mpkh/4P57g3FzNrGLckA9anzChK0GWDM=; b=F3yh56FVFL2PUmK/cByrpw5Xxo428a1/1CgQgEj0SDwGY/l/Jjkec/P00JhU2U1PkAtVln U9/oigenXSlP/2ML10rZdBn7xwuEb2zxxWKu+R1iSZ7G4NlKfSQcGnLuVjsGzT400bwYD6 CMhOld6wkSVWE1qzb037yHvV/kdZW3RIYz4MUWgz05mtcebYPNcvOPo5y0YqJRPACtrMbN Z7//tLxetncEdXfnydt1/q9B7q4TEv0PYfVqzF/EIuBz5T0XT6644OIAoZCDZGNdjDGEPr W+byrClzh2ZtsdWomz9csFMcHaoUc6HhmVezJcVWqwYqBOZlL7UpcaANoQwmJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679321667; a=rsa-sha256; cv=none; b=v7zyQrhnde3tvfdMf5Wi81YmabE4W+ES7Cf1aSSO7Gf0VeohLR8YOUkauG9NS5HyY1ID4R t2Eh6TyvkAt9s7RPHDXmuNBnVtmPsbsqmCapeCbEJfYxnM3eckd4rPdCzqyaRwgQpxXfvJ JglJdy3t8g275/vz0VgScPnuBnudQamh8QdD0OXqQuqbgT03DgIdFntRvLE9HDvpRBgbNY l1xDXLA9R0L6I+pYB1NAwaWlI5ic3OUbqzNvWBmuDgony/JWlkUDRPTfdJZRVnizr3s5A6 5pSgDxCumKHe3kRrztlCs9HyRIXK21gS20yd1THmZi2P2W7dKOw64o/cxXlA4w== 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 4PgGvQ61NkzYMl; Mon, 20 Mar 2023 14:14:26 +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 32KEEQaT039855; Mon, 20 Mar 2023 14:14:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32KEEQi0039854; Mon, 20 Mar 2023 14:14:26 GMT (envelope-from git) Date: Mon, 20 Mar 2023 14:14:26 GMT Message-Id: <202303201414.32KEEQi0039854@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: ddbd3a2b7c3c - main - carp tests: unicast tests (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: ddbd3a2b7c3c68e88d3da757a7d1fbbaff88f468 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddbd3a2b7c3c68e88d3da757a7d1fbbaff88f468 commit ddbd3a2b7c3c68e88d3da757a7d1fbbaff88f468 Author: Kristof Provost AuthorDate: 2023-03-06 07:49:57 +0000 Commit: Kristof Provost CommitDate: 2023-03-20 13:37:09 +0000 carp tests: unicast tests (IPv6) Test the new unicast carp mode for IPv6. There's a routing hop between the peers, to ensure that the TTL check is correctly disabled for unicast carp. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D38942 --- tests/sys/netinet/carp.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 22f1aa3ac0e3..445b32c8a337 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -211,6 +211,67 @@ basic_v6_cleanup() vnet_cleanup } +atf_test_case "unicast_v6" "cleanup" +unicast_v6_head() +{ + atf_set descr 'Unicast CARP test (IPv6)' + atf_set require.user root +} + +unicast_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 sysctl net.inet6.ip6.forwarding=1 + 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_one ifconfig ${bridge} inet6 alias 2001:db8:2::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_two route -6 add default 2001:db8:1::1 + jexec carp_uni_v6_two ifconfig ${epair_one}b inet6 add vhid 1 \ + peer6 2001:db8:2::2 \ + 2001:db8::0:1/64 + + jexec carp_uni_v6_three ifconfig ${epair_two}b inet6 2001:db8:2::2/64 \ + no_dad up + jexec carp_uni_v6_three route -6 add default 2001:db8:2::1 + jexec carp_uni_v6_three ifconfig ${epair_two}b inet6 add vhid 1 \ + peer6 2001:db8:1::2 \ + 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:2::2 + + 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_v6_cleanup() +{ + vnet_cleanup +} + atf_test_case "negative_demotion" "cleanup" negative_demotion_head() { @@ -350,6 +411,7 @@ atf_init_test_cases() atf_add_test_case "basic_v4" atf_add_test_case "unicast_v4" atf_add_test_case "basic_v6" + atf_add_test_case "unicast_v6" atf_add_test_case "negative_demotion" atf_add_test_case "nd6_ns_source_mac" atf_add_test_case "switch"