Skip to contentSkip to conversation

FreeBSD 12.x workaround for IPv6 ifconfig is needed on 12.4 as well

PATCH In review Gert Doering 2 participants 3 messages Mar 6, 2023 – Mar 8, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 FreeBSD 12.x workaround for IPv6 ifconfig is needed on 12.4 as well

Commit 16d7f2cd4d90 tried to remove an FreeBSD 12.x ifconfig inet6 workaround based on the understanding that the upstream fix for bug 248172 went into 12.4, but that was a misread of the code - 12.4 needs the workaround as well, fixed in 13.0.

Also extend comment to point to /etc/network.subr, which is the real source of the problematic code

        if checkyesno ipv6_activate_all_interfaces; then
                _ipv6_opts="-ifdisabled"
        elif [ "$1" != "lo0" ]; then                   <<<<
                _ipv6_opts="ifdisabled"                <<<<
        fi
---
 src/openvpn/tun.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
src/openvpn/tun.c +3 -3
index a1414d23..ca5c3b38 100644
@@ -1105,11 +1105,11 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu,
                          "generic BSD ifconfig inet6 failed");
 
 #if defined(TARGET_FREEBSD) && __FreeBSD_version >= 1200000 \
-    && __FreeBSD_version < 1204000
-    /* On FreeBSD 12.0-12.3, there is ipv6_activate_all_interfaces="YES"
+    && __FreeBSD_version < 1300000
+    /* On FreeBSD 12.0-12.4, 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".
+     * devd -> /etc/pccard_ether -> /etc/network.subr as "inet6 ifdisabled".
      *
      * The "is this interface already up?" test is a non-zero time window
      * which we manage to hit with our ifconfig often enough to cause
Signature · 1 line
2.39.2
Acked-by on v1 1/1
#1 lore raw

Am 06.03.23 um 09:07 schrieb Gert Doering:

Quoted 28 lines

Commit 16d7f2cd4d90 tried to remove an FreeBSD 12.x ifconfig inet6 workaround based on the understanding that the upstream fix for bug 248172 went into 12.4, but that was a misread of the code - 12.4 needs the workaround as well, fixed in 13.0.

Also extend comment to point to /etc/network.subr, which is the real source of the problematic code

         if checkyesno ipv6_activate_all_interfaces; then
                 _ipv6_opts="-ifdisabled"
         elif [ "$1" != "lo0" ]; then                   <<<<
                 _ipv6_opts="ifdisabled"                <<<<
         fi
---
  src/openvpn/tun.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
src/openvpn/tun.c +0 -1
index a1414d23..ca5c3b38 100644
@@ -1105,11 +1105,11 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu,
                           "generic BSD ifconfig inet6 failed");
 
  #if defined(TARGET_FREEBSD) && __FreeBSD_version >= 1200000 \
-    && __FreeBSD_version < 1204000

src/openvpn/tun.c do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, · line 1115

Quoted 10 lines
src/openvpn/tun.c +3 -2
-    /* On FreeBSD 12.0-12.3, there is ipv6_activate_all_interfaces="YES"
+    && __FreeBSD_version < 1300000
+    /* On FreeBSD 12.0-12.4, 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".
+     * devd -> /etc/pccard_ether -> /etc/network.subr as "inet6 ifdisabled".
       *
       * The "is this interface already up?" test is a non-zero time window
       * which we manage to hit with our ifconfig often enough to cause
#2 lore raw
In reply to Gert Doering

Patch has been applied to the master and release/2.6 branch.

commit 549fbd83f9d445863cc62b3a658a406afacdaeac (master) commit b48298ac510abd000f65fe935a2d1cf7c25ecbf3 (release/2.6)

Author: Gert Doering
Date:   Mon Mar 6 09:07:44 2023 +0100
     FreeBSD 12.x workaround for IPv6 ifconfig is needed on 12.4 as well

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg26335.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering