From 65dd61765ebd5e4c8c61cf18c17da4114f117fbd Mon Sep 17 00:00:00 2001 From: cnbatch Date: Wed, 8 May 2024 21:56:06 +0800 Subject: [PATCH] sorry, it was a typo --- src/openvpn/tun.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index de3c61bd6f0..bd673ed457a 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1182,6 +1182,12 @@ 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_OPENBSD) || defined(TARGET_NETBSD) \ + || defined(TARGET_DARWIN) + /* and, hooray, we explicitly need to add a route... */ + add_route_connected_v6_net(tt, es); +#endif + #elif defined(TARGET_FREEBSD) /* read current fib number, codes are from: */ /* https://github.com/freebsd/freebsd-src/blob/f9716eee8ab45ad906d9b5c5233ca20c10226ca7/sbin/route/route.c#L269 */ @@ -1236,11 +1242,6 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, int tun_mtu, "FreeBSD BSD 'ifconfig inet6 -ifdisabled' failed"); #endif -#if defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) \ - || defined(TARGET_DARWIN) - /* and, hooray, we explicitly need to add a route... */ - add_route_connected_v6_net(tt, es); -#endif #elif defined(TARGET_AIX) argv_printf(&argv, "%s %s inet6 %s/%d mtu %d up", IFCONFIG_PATH, ifname, ifconfig_ipv6_local, tt->netbits_ipv6, tun_mtu);