]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Undo FreeBSD 12.x workaround on IPv6 ifconfig for 12.4 and up
authorGert Doering <gert@greenie.muc.de>
Sat, 7 Jan 2023 16:25:58 +0000 (17:25 +0100)
committerGert Doering <gert@greenie.muc.de>
Mon, 9 Jan 2023 16:01:02 +0000 (17:01 +0100)
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 <gert@greenie.muc.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20230107162558.59659-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25911.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tun.c

index 6947312e610bfa18f8cc1579aa96a4efbf28cf5d..b204bc405b686870b23081739434683dbf4931e9 100644 (file)
@@ -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".