aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2010-03-07 19:30:56 +0100
committerGert Doering <gert@greenie.muc.de>2011-04-24 17:22:41 +0200
commit94d50a1720d94e3644333d716e8ccc6f7cbd21cb (patch)
tree97a00c6315134975746b5bc192111fb92cd888c9
parentWin32: set next-hop for IPv6 routes according to TUN/TAP mode - in TUN mode, (diff)
downloadopenvpn-94d50a1720d94e3644333d716e8ccc6f7cbd21cb.tar.xz
when deleting a route on win32, also add gateway address
(otherwise netsh.exe will succeed, but silently ignore request)
-rw-r--r--route.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/route.c b/route.c
index b150302..33f4698 100644
--- a/route.c
+++ b/route.c
@@ -1621,6 +1621,17 @@ delete_route_ipv6 (const struct route_ipv6 *r6, const struct tuntap *tt, unsigne
r6->netbits,
device);
+ /* next-hop depends on TUN or TAP mode:
+ * - in TAP mode, we use the "real" next-hop
+ * - in TUN mode we use a special-case link-local address that the tapdrvr
+ * knows about and will answer ND (neighbor discovery) packets for
+ * (and "route deletion without specifying next-hop" does not work...)
+ */
+ if ( tt->type == DEV_TYPE_TUN )
+ argv_printf_cat( &argv, " %s", "fe80::8" );
+ else
+ argv_printf_cat( &argv, " %s", gateway );
+
#if 0
if (r->metric_defined)
argv_printf_cat (&argv, "METRIC %d", r->metric);