From nobody Fri Jul 1 08:07:52 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 74D948B7BBB; Fri, 1 Jul 2022 08:07:52 +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 4LZ79N2Qjjz51Bh; Fri, 1 Jul 2022 08:07:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656662872; 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=8Psoc8iZkoRKHuzVQjtw9a164ZspXkK8UCV0HAIVBnM=; b=OXLRjt2QD6nUmzMErmD/ZEZOfnIjYZM5bnVGDM1ZJTaKf6Dey+0VOSBX4aXu5tUl92vYgu weXf/MGWtDi7morg11XWO6ZhncpJa9ajiTQrS0ywUgukP+1KTja/FWHlAeRDQs1TZpk54m FoueBcy2B7YCcsb3E7+xvBFPf+nS0fLTZEqAHaz4LMyZFysMT/UCo1f9B3RxE/HWyluVDX fwngvtlXa1zIpfhLVZf6Cl71L3WcJZy07UmWv+DTGlSAZZ/5vzARgwSGGRjEQa42nkEmKU YicuzigOf8s4EHZf3f7aONBMc/qy+9FRGtiy/ls+3IITVGVDxD+rbGQmu0ntMg== 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 32F3F17667; Fri, 1 Jul 2022 08:07:52 +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 26187q9a001327; Fri, 1 Jul 2022 08:07:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26187qRB001326; Fri, 1 Jul 2022 08:07:52 GMT (envelope-from git) Date: Fri, 1 Jul 2022 08:07:52 GMT Message-Id: <202207010807.26187qRB001326@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: 5fb35badc0d5 - main - if_ovpn tests: IPv4-mapped IPv6 address test 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: 5fb35badc0d5e27aa2259b2fdeb83a988184faf3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656662872; 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=8Psoc8iZkoRKHuzVQjtw9a164ZspXkK8UCV0HAIVBnM=; b=YmyM8P+vCYcT/BG6oVe20hMG8YTmRNaiFL7d6vu6z3toh/M3iLNHSl61B6OMj7P+zA+xrh QuhqQsPJGs0VQqwh6GrOTAVitN/hILrLrs21KnACPUyhzUjmehymsguOSaqii1yeLhlz8n VaOTo8kwaYJlQuNqXP45OkRdMhXqsUQEAUHRmMAqoiFxKe6VJJar5m6BuIs46dPBUZ+g6Z xttFKnqzQORys5fNVb02PnhjxKJxaB0ALyHDTSBbNq6F6P7scBgk/QSQHVWpUcOFHwsKwE VvoFHh3KHao4hTl66jihLEGC1rvzoaxyL5dYe1BSdMDFW3cuHVQnZRv8u/R6cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656662872; a=rsa-sha256; cv=none; b=Ll3PjGLeZl5b2aIgCLM+TS9SnhsNRE1xcgD+eQiJbgr/WcW/dFMIjVKG2NEBfTOAAlZnAF oo8rgKl3610B3+Ju7fHdifCzcvP4YyiRzvau8gctlHQLYkt1wID0qQCFbWTWmvwricglaJ 7+RVt/T9VxrVD6xD3A8MJ6a4cZwj0pxZqo0KnpS9PArSBMS4HSUI1xqZOaGibRJhgYL1y0 BDPP81Eq/P+1yAPS4abou1nTn3a7/RRW/5nZtB6PzQWtTAZGlZHeJpt5+ge5VtM7advXi3 1XfPMN6TgktFjRValsB8kiamAFIbmFD+AC0I8DUzWrRZ8RC9UoqIeB0Iyr8s6A== 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=5fb35badc0d5e27aa2259b2fdeb83a988184faf3 commit 5fb35badc0d5e27aa2259b2fdeb83a988184faf3 Author: Kristof Provost AuthorDate: 2022-06-30 15:47:58 +0000 Commit: Kristof Provost CommitDate: 2022-07-01 08:02:32 +0000 if_ovpn tests: IPv4-mapped IPv6 address test OpenVPN uses IPv4-mapped IPv6 addresses by default (if we don't specify 'proto udp4', or an IPv4 address to bind to). Test that this works. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/net/if_ovpn/if_ovpn.sh | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index fcf05372d3b9..fb32e3ed1895 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -99,6 +99,78 @@ atf_test_case "4in4" "cleanup" ovpn_cleanup } +atf_test_case "4mapped" "cleanup" +4mapped_head() +{ + atf_set descr 'IPv4 mapped addresses' + atf_set require.user root + atf_set require.progs openvpn +} + +4mapped_body() +{ + ovpn_init + + l=$(vnet_mkepair) + + vnet_mkjail a ${l}a + jexec a ifconfig ${l}a 192.0.2.1/24 up + vnet_mkjail b ${l}b + jexec b ifconfig ${l}b 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore jexec a ping -c 1 192.0.2.2 + + #jexec a ifconfig ${l}a + + ovpn_start a " + dev ovpn0 + dev-type tun + + cipher AES-256-GCM + auth SHA256 + + server 198.51.100.0 255.255.255.0 + 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 192.0.2.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 ping -c 3 198.51.100.1 +} + +4mapped_cleanup() +{ + ovpn_cleanup +} + atf_test_case "6in4" "cleanup" 6in4_head() { @@ -693,6 +765,7 @@ chacha_cleanup() atf_init_test_cases() { atf_add_test_case "4in4" + atf_add_test_case "4mapped" atf_add_test_case "6in4" atf_add_test_case "6in6" atf_add_test_case "4in6"