Hi, On Wed, Jun 13, 2018 at 09:55:16PM +0800, Antonio Quartulli wrote: > From: Antonio Quartulli <anto...@openvpn.net> > > This change ensures that an interface is properly brought > up and down even when only IPv6 settings are configured/pushed. > > At the same time, some code restyling took place to ensure the new > generic logic is easier to read. Both do_ifconfig() and close_tun() > (Linux only) functions have been rearranged by splitting the logic > into a v4 and a v6 specific part. Each part has then been moved > into an idependent helper that can be invoked as > needed. > > This makes the code easier to read and more "symmetric" with > respect to the two address families. > > Trac: #208 > Signed-off-by: Antonio Quartulli <anto...@openvpn.net>
Thanks. Can I have a v5, please, that has been buildbot-compile-tested...? This version breaks OpenSolaris, as > +#elif defined(TARGET_SOLARIS) > + argv_printf(&argv, "%s %s inet6 unplumb", IFCONFIG_PATH, ifname); > + argv_msg(M_INFO, &argv); > + openvpn_execve_check(&argv, es, 0, NULL); > > - if (tt->did_ifconfig_ipv6_setup) > + if (tt->type == DEV_TYPE_TUN) > + { > + const char *ifconfig_ipv6_remote = print_in6_addr(tt->remote_ipv6, > 0, gc); > + ... this has to be "&gc"... so, I do understand that you really do not like this line, but please... Besides this, I've not only compiled but actually tested IPv6-only mode on Linux (Gentoo), FreeBSD (10.4), NetBSD (7.0), OpenSolaris (with the trival patch), OpenBSD 6.0, MacOS X (something current, Arne's box). Haven't tested Windows yet as we know it will not work until 2/8 is merged (IPv4-only or IPv4+IPv6 is expected to be unaffected) - but it builds fine, so no larger accidents. All the other code changes look reasonable ("git diff -w --color-moved=zebra" plus "visually comparing with a pre-patch tun.c"). Since we're a bit strict about code changes that are bigger than whitespace and comments... can I have a v5, please? gert PS: Side note 1: MacOS is actually slightly strange and needs repair - the call to (e.g.) "ifconfig utun1 delete" actually doesn't "delete" anything but tries to find a host named "delete" and ifconfig it on "utun1"... but this is old stuff which propably worked 5 MacOS versions ago... and the on-link route might also no longer be needed. Need to test this on "more MacOS versions", plus look at the MacOS patch that is lingering on the list... -- "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 g...@greenie.muc.de
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel