diff options
author | Alberto Gonzalez Iniesta <agi@inittab.org> | 2014-09-02 12:20:00 +0200 |
---|---|---|
committer | Alberto Gonzalez Iniesta <agi@inittab.org> | 2014-09-02 12:20:00 +0200 |
commit | 809daf3b371e0c2457b5d4bd414382eb67bf8348 (patch) | |
tree | d5c82a6442126ce99f8d569f6bca574433487f4b /src/openvpn/route.c | |
parent | 0af7f64094c65cba7ee45bd2679e6826bcf598cb (diff) |
Imported Upstream version 2.3.4upstream/2.3.4
Diffstat (limited to 'src/openvpn/route.c')
-rw-r--r-- | src/openvpn/route.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 6333ee7..532edc6 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -595,7 +595,7 @@ init_route_list (struct route_list *rl, if (rl->rgi.flags & RGI_ADDR_DEFINED) { setenv_route_addr (es, "net_gateway", rl->rgi.gateway.addr, -1); -#ifdef ENABLE_DEBUG +#if defined(ENABLE_DEBUG) && !defined(ENABLE_SMALL) print_default_gateway (D_ROUTE, &rl->rgi); #endif } @@ -1974,10 +1974,16 @@ delete_route_ipv6 (const struct route_ipv6 *r6, const struct tuntap *tt, unsigne argv_printf_cat (&argv, "METRIC %d", r->metric); #endif + /* Windows XP to 7 "just delete" routes, wherever they came from, but + * in Windows 8(.1?), if you create them with "store=active", this is + * how you should delete them as well (pointed out by Cedric Tabary) + */ + argv_printf_cat( &argv, " store=active" ); + argv_msg (D_ROUTE, &argv); netcmd_semaphore_lock (); - openvpn_execve_check (&argv, es, 0, "ERROR: Windows route add ipv6 command failed"); + openvpn_execve_check (&argv, es, 0, "ERROR: Windows route delete ipv6 command failed"); netcmd_semaphore_release (); #elif defined (TARGET_SOLARIS) |