From nobody Tue Jun 28 11:59:35 2022 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 B70FE86341A; Tue, 28 Jun 2022 11:59:37 +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 4LXNS84Hlwz3Qt5; Tue, 28 Jun 2022 11:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656417576; 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=hrdWp4+cjKgi026drO9DaqIaV0Tlwn5f7pNyg5PnEY0=; b=i9WkbyGuslxup2D6wKNZ4tgiNf5BoVOO1DfD7vfVogMvmppQfFqQ6Y/NeRnn8tLdHbxxfS B7KO33YNCvfZDlKr1e4Ns4itMBliFexK9C/ZnN6rWwe1Wxni5lGtscCiVS7uVF6MOUm3n/ rP8Ps4A5jDUUiqdlpxSjl3EreIG64hEnQlAGnl+ShbGNCn+5SEMa55eNb6XlJ3ic9yPZ+6 que6z6Er7jseMoWByC7PjirCcPFdXdZOdvj31Ddif4dPcDbIk50+OKUvzeLd1aM8/RU1BH U13WKnW3fxO0TKRGgUKGRFAzuwUq1I/KElu5rJBem1iHByDy/F5d2uYYg1hhGg== 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 0B4481C90A; Tue, 28 Jun 2022 11:59:36 +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 25SBxZpE055656; Tue, 28 Jun 2022 11:59:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25SBxZkm055655; Tue, 28 Jun 2022 11:59:35 GMT (envelope-from git) Date: Tue, 28 Jun 2022 11:59:35 GMT Message-Id: <202206281159.25SBxZkm055655@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: 3d4f61350d99 - main - if_ovpn tests: tunnel over IPv6 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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: 3d4f61350d99f2e345ff85e202c8a38c3eff957a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656417576; 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=hrdWp4+cjKgi026drO9DaqIaV0Tlwn5f7pNyg5PnEY0=; b=BLH5AuP98Y++1Jorl6KxXZRiAjcvwDdKkf+6I2PA1sBQC+bALPYIbEApSr/NUmxissva2m sZv07iew25wKR9oxaSTCvshLVIZdjxmkYcDQQMODq1wfeJgTVcRujI4dS6qxT/UX1MBPCq DT2nR+RpbLnK/AEJjNOK4ZNffORJNl4eciLbfDVQg6xoDnaGgCYqnygxSqL+awU3dtSkQw mg84u5l08jAPVh6G/3ytJH7mo2b1U6EBLkvb/2NyT0p4+vFLN3wc+ikcOr9VGm5NT2bOp1 fCT/zkK0IXvInwJCAax4/4Vkt8J2BefqFC3i5iJLkYIiNViBTUBMGmLb4Xy8fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656417576; a=rsa-sha256; cv=none; b=gEUmvaNbUfIqbuC6+jkwbHEIp2B6orAzlIE7cZgWVorzfDUpj28L7w/nY13KiKLA62dPLc IIDJY+fU7L0ydZ7JSFYFfQ0prG/MOzc4yOKC+IO/tJXYYh+VfPMFhHYao6K9yjdSiua3vb qbEiyIDg9GmR7N6IA1TXk9O2v/LWwSiqlaqez/p+NvLkYfU1NYXzwNKYZyxwCw43l66Aak EuiRdTbd2Q0DsXMLRweXvtnVYprvFPYe/JzU43Gt2K2BFYJ3iEW3+qRK44nkzcUmqj9IQZ WHTsX85WupAAsNTZQQJLAtkYGjs5OnBJBu2cDjm6pnMrFHYeU43wwQ8yAjJbkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3d4f61350d99f2e345ff85e202c8a38c3eff957a commit 3d4f61350d99f2e345ff85e202c8a38c3eff957a Author: Kristof Provost AuthorDate: 2022-05-18 07:41:52 +0000 Commit: Kristof Provost CommitDate: 2022-06-28 11:50:58 +0000 if_ovpn tests: tunnel over IPv6 Set up a tunnel over IPv6 carrying IPv6 traffic. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/net/if_ovpn/if_ovpn.sh | 74 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index d9e2f371287f..febc692bd8f0 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -98,6 +98,79 @@ atf_test_case "4in4" "cleanup" ovpn_cleanup } +atf_test_case "6in6" "cleanup" +6in6_head() +{ + atf_set descr 'IPv6 in IPv6 tunnel' + atf_set require.user root + atf_set require.progs openvpn +} + +6in6_body() +{ + ovpn_init + + l=$(vnet_mkepair) + + vnet_mkjail a ${l}a + jexec a ifconfig ${l}a inet6 2001:db8::1/64 up no_dad + vnet_mkjail b ${l}b + jexec b ifconfig ${l}b inet6 2001:db8::2/64 up no_dad + + # Sanity check + atf_check -s exit:0 -o ignore jexec a ping6 -c 1 2001:db8::2 + + ovpn_start a " + dev ovpn0 + dev-type tun + proto udp6 + + cipher AES-256-GCM + auth SHA256 + + local 2001:db8::1 + server-ipv6 2001:db8:1::/64 + + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/server.crt + key $(atf_get_srcdir)/server.key + dh $(atf_get_srcdir)/dh.pem + + mode server + script-security 2 + auth-user-pass-verify /usr/bin/true via-env + topology subnet + + keepalive 100 600 + " + ovpn_start b " + dev tun0 + dev-type tun + + client + + remote 2001:db8::1 + auth-user-pass $(atf_get_srcdir)/user.pass + + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/client.crt + key $(atf_get_srcdir)/client.key + dh $(atf_get_srcdir)/dh.pem + + keepalive 100 600 + " + + # Give the tunnel time to come up + sleep 10 + + atf_check -s exit:0 -o ignore jexec b ping6 -c 3 2001:db8:1::1 +} + +6in6_cleanup() +{ + ovpn_cleanup +} + atf_test_case "timeout_client" "cleanup" timeout_client_head() { @@ -185,5 +258,6 @@ timeout_client_cleanup() atf_init_test_cases() { atf_add_test_case "4in4" + atf_add_test_case "6in6" atf_add_test_case "timeout_client" }