]> git.ipfire.org Git - thirdparty/openvpn.git/commit
get_default_gateway_ipv6(): Win32 implementation using GetBestRoute2()
authorGert Doering <gert@greenie.muc.de>
Fri, 11 Sep 2015 15:33:47 +0000 (17:33 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 6 Oct 2015 07:35:45 +0000 (09:35 +0200)
commit5fcd49336812053aa1503078c0ebb72a2737a6b8
tree452477f51c0057cc5bfe451c8fc0ce2966b9c168
parentf96baabc6cf10edddedda1819a27a6927f274d8e
get_default_gateway_ipv6(): Win32 implementation using GetBestRoute2()

To get access to that functionality, bump Windows API level for MinGW
compilation from NTDDI_WINXP/_WIN32_WINNT_WINXP to ..._VISTA, and
shuffle around WIN32 includes a bit in syshead.h

MinGW 32 seems to be broken regarding MIB_TCP_STATE enum, so add typedef
for that - surrounding #ifdefs found by googling do not work yet -> TODO!

Extend add_route_ipv6() and delete_route_ipv6() to handle routes not on
the tap adapter but on ifindex-addressed interfaces ("interface=nn"),
and while at it, fix deletion of IPv6 routes with gateway address.

NOTE: this breaks Windows XP compatibility as GetBestRoute2() is not
available there, so even when not using IPv6, the binary will not run.

(Lightly) tested on Win7/64.

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Lazy-ACK-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1441985627-14822-11-git-send-email-gert@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/10085
configure.ac
src/openvpn/route.c
src/openvpn/syshead.h