Hi,

On Sun, Nov 20, 2016 at 04:18:54PM -0500, Selva Nair wrote:
> This also applies to --ifconfig-noexec.
> 
> Resolves Trac #723
> 
> Signed-off-by: Selva Nair <selva.n...@gmail.com>

The patch is fine code-wise, but I'm not sure if it is the best approach.

We have this funny bit of special-case code:

options.c, around line 2550

#ifdef _WIN32
...
  if (options->ifconfig_noexec)
    {
      options->tuntap_options.ip_win32_type = IPW32_SET_MANUAL;
      options->ifconfig_noexec = false;
    }
#endif

I skimmed through init.c and tun.c / do_ifconfig(), and even though
Heiko normalized the IFCONFIG_BEFORE_TUN_OPEN part, Windows is still
not "normal" - part of the ifconfig is done in open_tun(), which is
always called, but *only* if ip_win32 is not "IPW32_SET_MANUAL"...


So, I wonder if just removing the "options->ifconfig_noexec = false;"
line from the code above would achieve the desired effect, with a 
smaller windows special case code base?  It would still call open_tun(),
which would not touch anything (because IPW32_SET_MANUAL) and then
skip do_ifconfig() later on, so IPv6 would not happen.

Of course there is a slight asymmetry if someone insists on explicitely
configuring "ip-win32 manual" - in that case, v4 would not happen and
v6 would.  This was partly intentional when doing the IPv6 stuff, as I
consider the whole "ip-win32" nightmare to be not applicable to IPv6...


Please do not consider this a NAK, just a "what if..." thinking loud.

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to