Hi, On 09/10/2019 11:51, Gert Doering wrote: > commit 611fcbc48 joined the two distinct calls for "add ipv6 address > to tap interface" and "set MTU" for Solaris - but due to peculiarities > on how this platform handles IPv6 addresses ("ifconfig addif" creates > a new "tap0:1" subinterface with the new address - which does not have > a distinct MTU) this does not work. > > un-join calls again.
Thanks for fixing my change. The patch makes sense as it simply restores the original flow. I have only reviewed the code and compile-tested it, but I trust Gert who said to have performed a t_client test on his OpenIndiana2019 host (which is where the problem was found in the first place). Acked-by: Antonio Quartulli <anto...@openvpn.net> > > Signed-off-by: Gert Doering <g...@greenie.muc.de> > --- > src/openvpn/tun.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > > diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c > index 0591df65..ce23eb6a 100644 > --- a/src/openvpn/tun.c > +++ b/src/openvpn/tun.c > @@ -937,9 +937,11 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, > int tun_mtu, > * server will ignore the DHCPv6 packets anyway. So we don't. > */ > > - /* static IPv6 addresses need to go to a subinterface (tap0:1) */ > - argv_printf(&argv, "%s %s inet6 addif %s/%d mtu %d up", > IFCONFIG_PATH, > - ifname, ifconfig_ipv6_local, tt->netbits_ipv6, tun_mtu); > + /* static IPv6 addresses need to go to a subinterface (tap0:1) > + * and we cannot set an mtu here (must go to the "parent") > + */ > + argv_printf(&argv, "%s %s inet6 addif %s/%d up", IFCONFIG_PATH, > + ifname, ifconfig_ipv6_local, tt->netbits_ipv6 ); > } > argv_msg(M_INFO, &argv); > > @@ -947,6 +949,14 @@ do_ifconfig_ipv6(struct tuntap *tt, const char *ifname, > int tun_mtu, > { > solaris_error_close(tt, es, ifname, true); > } > + > + if (tt->type != DEV_TYPE_TUN) > + { > + argv_printf(&argv, "%s %s inet6 mtu %d", IFCONFIG_PATH, > + ifname, tun_mtu); > + argv_msg(M_INFO, &argv); > + openvpn_execve_check(&argv, es, 0, "Solaris ifconfig IPv6 mtu > failed"); > + } > #elif defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) \ > || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) \ > || defined(TARGET_DRAGONFLY) > -- Antonio Quartulli
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel