Undo FreeBSD 12.x workaround on IPv6 ifconfig for 12.4 and up
PATCH 1/1 Undo FreeBSD 12.x workaround on IPv6 ifconfig for 12.4 and up
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
--- src/openvpn/tun.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
src/openvpn/tun.c +3 -2
@@ -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".
Signature · 1 line
2.38.1
Am 27.12.22 um 23:35 schrieb Gert Doering:
Quoted 20 lines
commit
5e19cc2c1bf22dintroduced 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 <[email protected]...>--- src/openvpn/tun.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)src/openvpn/tun.c +0
-0
src/openvpn/tun.c do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, · line 1109
Quoted 8 lines
src/openvpn/tun.c +3
-2@@ -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"
That does not look right. Should the second one be < 1300000? Otherwise I would rather simplify the expression to __FreeBSD_version == 1200000 since that is what it currently is.
Quoted 3 lines
src/openvpn/tun.c +0
-0* 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".
Hi,
Quoted 8 lines · Arne Schwabe
src/openvpn/tun.c do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, · line 1109
Quoted 3 lines
src/openvpn/tun.c +3
-0+#if defined(TARGET_FREEBSD ) && __FreeBSD_version >=1200000 \ + && __FreeBSD_version <=1200000 +/* On FreeBSD 12.0-12.3, there is ipv6_activate_all_interfaces="YES" That does not look right. Should the second one be < 1300000? Otherwise I would rather simplify the expression to
__FreeBSD_version== 1200000 since that is what it currently is.
Of course that needs to be 1300000 (and of course it "worked" in my test on FreeBSD 13... but it seems I forgot to re-test on 12.2/12.3)
v2 RSN.
gert
Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany [email protected]...PATCH v2 1/1 Undo FreeBSD 12.x workaround on IPv6 ifconfig for 12.4 and up
In reply to Gert Doeringcommit 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
--- src/openvpn/tun.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
src/openvpn/tun.c +3 -2
@@ -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".
Signature · 1 line
2.38.1
Am 07.01.23 um 17:25 schrieb Gert Doering:
Quoted 10 lines
commit
5e19cc2c1bf22dintroduced 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
Thanks that looks now better.
Thanks for the review and for fixing my fat fingers :-)
Patch has been applied to the master and release/2.6 branch.
commit 16d7f2cd4d904274580b2f031e92dde2f7f260c9 (master) commit d9906d1523a8ed46fce81cb8d559279e345bf849 (release/2.6)
Author: Gert Doering Date: Sat Jan 7 17:25:58 2023 +0100
Undo FreeBSD 12.x workaround on IPv6 ifconfig for 12.4 and up
Signed-off-by: Gert Doering <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg25911.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering