]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Windows: do_ifconfig() after open_tun()
authorHeiko Hund <heiko.hund@sophos.com>
Fri, 24 Jun 2016 16:01:41 +0000 (18:01 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 17 Oct 2016 10:30:21 +0000 (12:30 +0200)
commit533495298bd93ddaaf4418dc666922779ce5ef9b
tree518691e61e144451171bfe9acf3c9454c1b30dd7
parent86e2fa5597fd1ad8e0102f134c63d6bc8cb7c291
Windows: do_ifconfig() after open_tun()

When you had multiple TAP adapters and IPv6 configured you got an error
message about "you must also specify --dev-node" and openvpn exited.
Very inconvenient especially since this is only due to the fact that
Windows tries to set the adapter address before it is opened; for no
good reason.

This patch changes the order to IFCONFIG_AFTER_TUN_OPEN, moves some
initialization code to init_tun, where it belongs, and removes duplicate
code that is now no longer needed.

v2: do not use "%lu" in argv_printf(), crashes non-iservice usage

Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Heiko Hund <heiko.hund@sophos.com>
Message-Id: <20161009152550.GQ78279@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg12631.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tun.c
src/openvpn/tun.h