From patchwork Sat Jan 7 16:25:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 2981 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:c95:b0:82:e4b3:40a0 with SMTP id p21csp1750787dyk; Sat, 7 Jan 2023 08:26:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXuuI2E6HorAPcYWm1xjfCy+ugStctmHDYiocfRbgrhMKvKZf8s+YZLSuyp3Icood+x3ZsDX X-Received: by 2002:a05:6a20:d496:b0:a7:a3cf:ddce with SMTP id im22-20020a056a20d49600b000a7a3cfddcemr67179047pzb.21.1673108802035; Sat, 07 Jan 2023 08:26:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673108802; cv=none; d=google.com; s=arc-20160816; b=UcrqI2TvN2zkSjLuXKjybZiDnGveeFQN3H2nV3P+OOMCUl0RREwrJeuwv+4rB+v3yy DyCKk++se2Dfv+R0wWBuAEwNRONIpyc5tq3EpVW0XvUUdOxa58QQSo/Xxn48oFEAK6V1 z+8XBpTRZLlHlA+HmrprHTte555KSuTXI1vIAq/da1x2CwUvmFmQ4CKAfPyLL5luDfl+ ppDoSVblvafYRYnPZexZByPRSuf7RcBF0Eeo4fNZ5O1Bc7YqFlvPfECF17Hi5qHpWT5V 7KGsmgZnLCOhZUV1ZWl1ZXquzS11N+AvN6l0rX2VDKCE57LZZfrz3LuSNIn4IV6WDSM5 k/zw== 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:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=ANDz+qYOIFGdeacLl+StiftEf+ACWAiMbzIp4X4eYa0=; b=v4QAee5EQLTWUQR+MvA6IrwCy9tZZQGkVWbT79a18cu5L4ZCaAdEJJ89OBp703nVQX rneg1bnoCR/wMOc/0iHvoIXaQmljaQYQgCfbqfud7Ej3KJI8jE+ICPi4OT2I3VjiWWeT guYIRoyD5nXPTg3ckjz45hKGL0RnxOxwtBl5NaunfWTbjYe0cxn/C28UFd1mdVqALnN4 K7mT1KnE1ff4CmDV5Xt1y3zD4cRqDPxnWNcOO0UCPz6yTDnqeyoxwxbwhz09jbbIjHhj MznvP48zKofeYncHeBZuJ/tTZZhx2mQ8YEzWR2bYWk+4y3vURNpqQOQJtg2qknL9L7Yi nhsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=Ye1U5rd9; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="Jo/WheOm"; 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 r62-20020a632b41000000b00478831ab0d2si4485200pgr.715.2023.01.07.08.26.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jan 2023 08:26:42 -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=Ye1U5rd9; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b="Jo/WheOm"; 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 1pEC1X-0002Fb-6E; Sat, 07 Jan 2023 16:26:23 +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 1pEC1O-0002FP-GI for openvpn-devel@lists.sourceforge.net; Sat, 07 Jan 2023 16:26:14 +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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0xbL3BDTcuCfCM3ZXlW+qfAR2q1cC0IBSzqUN6K0qD8=; b=Ye1U5rd9ooKVi+93E7xl8+Nm/0 YnDw6G3UzNr/EL0lP12fMH0zfc8S1R85kGNyFPolHnxueOn+cdVxaUFq/gxuWL+CkDPvrVDXvXnsX 6GHeaSFA1gWnE4P1C2GACoxoxoBBeGBw4x4oAUPp+T29Ki0W2VOuik1EoqlR8Ju3ySQw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0xbL3BDTcuCfCM3ZXlW+qfAR2q1cC0IBSzqUN6K0qD8=; b=Jo/WheOmgIBnxdkTcAeWAZl6qz VkmVXtgk1lMG/D+AT4Rtbtic06uLZiRwOY2+EarfJ50yVf2ooUyBXr9AsJ2EkpQTGwysrje7GK95s OmOSNsCq+t+nquBnLfhAWFpSlvoaFUCgEI52g2N9yHkLYdYC/kztWtmU7dqAYxqRxbwE=; 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 1pEC1K-008sy6-HM for openvpn-devel@lists.sourceforge.net; Sat, 07 Jan 2023 16:26:14 +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 307GPwrI009242 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=FAIL) for ; Sat, 7 Jan 2023 17:25:58 +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 307GPwTB059668 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sat, 7 Jan 2023 17:25:58 +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 307GPwHl059667 for openvpn-devel@lists.sourceforge.net; Sat, 7 Jan 2023 17:25:58 +0100 (CET) (envelope-from gert) From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Sat, 7 Jan 2023 17:25:58 +0100 Message-Id: <20230107162558.59659-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221227223506.34136-1-gert@greenie.muc.de> References: <20221227223506.34136-1-gert@greenie.muc.de> 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]); Sat, 07 Jan 2023 17:25:58 +0100 (CET) X-Spam-Score: -2.0 (--) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.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.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Headers-End: 1pEC1K-008sy6-HM Subject: [Openvpn-devel] [PATCH v2] 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?1754381735112198368?= 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. v2: fix version number comparison Trac: 1226 Signed-off-by: Gert Doering Acked-By: Arne Schwabe --- 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..8d884461 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 < 1204000 + /* 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".