From patchwork Tue Dec 27 22:35:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 2955 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp2963652dyk; Tue, 27 Dec 2022 15:16:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXtD9GV35hG3ehxzD4HFNjjjuCowznznFhne5E7RDTX4vLSoKgEx3P7q6aP5eW1o/psxPYn/ X-Received: by 2002:a05:6a20:49af:b0:9d:efbf:48d2 with SMTP id fs47-20020a056a2049af00b0009defbf48d2mr21751994pzb.22.1672183017358; Tue, 27 Dec 2022 15:16:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672183017; cv=none; d=google.com; s=arc-20160816; b=0SzUPTUbLr6o5oSJ1e34YNy+WIJlg/voFp2leaMftpmsgt9vpV3n/7q0fcth+qMnJ6 pNHTt7cga8kflIYMP5XArZvPca/VYffh3mkLiC0GwFR7+QefM5T04liiMoiAIDsaEsxQ kcUNTrYmB4w0aOBICsSqO06k6A12Ll4gBEUfynmYZqKWuaaXqu/7b52Ksqsrg/GrbWVy IifTz0fCR6zFRG18t6HRPAWFaMPsc4rK0we0UCBILkeRJekt3sXvUV1fDoAHH114D3UW WKxeTt1qolW8TeF76d1hXD+QVE77sEXWlczQH0tJmWFYXQOQ/oHN540DDcfRqhE/fyTC SVdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:dkim-signature; bh=rXy463brIv8JfbNde3fvJHP7e5o+VAw1Q4qDcZMda1Y=; b=MdJLGf4oH0iqA/6AgxRJ2n0cDesPtdIFAe7lLTN9VlyucjFWq0KXaI2T66h/I5Sexq xMCbFV9eP0TbRWhdZj7mA34kH3SnviceZpwzJ08HJzmCWUz0ofFw4RYwq+xmSV9UfGia oTrrPOYj/yF9+4lHkzLtDUSM9dX2y924sp3kvDoM84Y4rp+1ZWPOzAdEpPFN2qQWzFxy HbTL/KMkJ6wJQnkJSAanRk+7JZqCYM54rLmGo+qXlVf4YoKa4uT++I1AdBA6NRVK2uDN RcQRbqXgAo7L3941umttZ4uL6x5fKropf2zSlhpmNZBSSG5KzqDlg/s7++jAD65+ROCF TPzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="QS/qN+9Z"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XbKIN5LY; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id q4-20020a63cc44000000b0046f4d39c588si15357917pgi.580.2022.12.27.15.16.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2022 15:16:57 -0800 (PST) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="QS/qN+9Z"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=XbKIN5LY; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1pAJBS-000141-3K; Tue, 27 Dec 2022 23:16:34 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pAJBQ-00013v-UQ for openvpn-devel@lists.sourceforge.net; Tue, 27 Dec 2022 23:16:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mxbkMQuwA4RoG9wKuPl5DYdnKXxvvTN9xCcE5B1+5Yk=; b=QS/qN+9ZT/uspxz0wF+U7+LcW7 qFmZ9Wz9fUNcmFmlftfasOEaolhxc2LSeRQgEti3hckxzUNtvbjWJsNUIRKcqX3uODcuGPQX7WRiV R666S0DqnjfcADmlkRcH/1SMwT/+HMYyE8k/n4tu68Bne7A2F18L5kmWHs1EjI5T4z1o=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=mxbkMQuwA4RoG9wKuPl5DYdnKXxvvTN9xCcE5B1+5Yk=; b=X bKIN5LYxaBbkmBbqnD68rEsDPy8g4lHrDhId5xJdS0j9Q+rUk/Uhns6dR65VVmUEWWikNAIoGq/2/ IimvWvO5fOW5TjtgzazUafSHT5iZbKjvtJCNoMhEsdNVQu1YvhTUWtRXpYo9hy2+UoQoLE8vwvlvP xBhS5tVhVdFnaODc=; Received: from vmail1.greenie.net ([195.30.8.66]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1pAJBP-00EdQZ-2V for openvpn-devel@lists.sourceforge.net; Tue, 27 Dec 2022 23:16:32 +0000 Received: from fbsd12.ov.greenie.net (fbsd12.ov.greenie.net [IPv6:2001:608:0:814:0:0:f000:19]) by vmail1.greenie.net (8.17.1/8.16.1) with ESMTPS id 2BRMZ6rJ053610 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=FAIL) for ; Tue, 27 Dec 2022 23:35:06 +0100 (CET) Received: from fbsd12.ov.greenie.net (localhost [127.0.0.1]) by fbsd12.ov.greenie.net (8.16.1/8.16.1) with ESMTPS id 2BRMZ65Y034145 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 27 Dec 2022 23:35:06 +0100 (CET) (envelope-from gert@fbsd12.ov.greenie.net) Received: (from gert@localhost) by fbsd12.ov.greenie.net (8.16.1/8.16.1/Submit) id 2BRMZ6DI034144 for openvpn-devel@lists.sourceforge.net; Tue, 27 Dec 2022 23:35:06 +0100 (CET) (envelope-from gert) From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Tue, 27 Dec 2022 23:35:06 +0100 Message-Id: <20221227223506.34136-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.4 (vmail1.greenie.net [IPv6:2001:608:1:995a:20c:29ff:feb8:10eb]); Tue, 27 Dec 2022 23:35:06 +0100 (CET) X-Spam-Score: -2.0 (--) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: commit 5e19cc2c1bf22d introduced a workaround for a race condition that showed itself on IPv6 ifconfig on FreeBSD 12.x - sometimes breaking IPv6 connectivity on tun/tap interfaces. This was fixed on the FreeBSD side in 12.4, 13.1 and up, and 13.0 is no longer supported. So conditionalize the workaround on "12.0..12.3", to be fully removed later when 12.3 is also running out of s [...] Content analysis details: (-2.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.30.8.66 listed in list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pAJBP-00EdQZ-2V Subject: [Openvpn-devel] [PATCH] Undo FreeBSD 12.x workaround on IPv6 ifconfig for 12.4 and up X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1753410979591877287?= X-GMAIL-MSGID: =?utf-8?q?1753410979591877287?= commit 5e19cc2c1bf22d introduced a workaround for a race condition that showed itself on IPv6 ifconfig on FreeBSD 12.x - sometimes breaking IPv6 connectivity on tun/tap interfaces. This was fixed on the FreeBSD side in 12.4, 13.1 and up, and 13.0 is no longer supported. So conditionalize the workaround on "12.0..12.3", to be fully removed later when 12.3 is also running out of support. Trac: 1226 Signed-off-by: Gert Doering --- src/openvpn/tun.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index a83ec9e6..399e851b 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1104,8 +1104,9 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, openvpn_execve_check(&argv, es, S_FATAL, "generic BSD ifconfig inet6 failed"); -#if defined(TARGET_FREEBSD) && __FreeBSD_version >= 1200000 - /* On FreeBSD 12 and up, there is ipv6_activate_all_interfaces="YES" +#if defined(TARGET_FREEBSD) && __FreeBSD_version >= 1200000 \ + && __FreeBSD_version <= 1200000 + /* On FreeBSD 12.0-12.3, there is ipv6_activate_all_interfaces="YES" * in rc.conf, which is not set by default. If it is *not* set, * "all new interfaces that are not already up" are configured by * devd + /etc/pccard_ether as "inet6 ifdisabled".