From: Gert Doering Date: Fri, 5 Mar 2010 08:42:11 +0000 (+0100) Subject: Win32: set next-hop for IPv6 routes according to TUN/TAP mode - in TUN mode, X-Git-Tag: v2.3-alpha1~239^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9557fcbdf986bac3bce519978600c881e9911ce;p=thirdparty%2Fopenvpn.git Win32: set next-hop for IPv6 routes according to TUN/TAP mode - in TUN mode, use special next-hop address (fe80::8) that tapdrv will handle ND for --- diff --git a/route.c b/route.c index 1604e9eb5..b150302e1 100644 --- a/route.c +++ b/route.c @@ -1348,9 +1348,19 @@ add_route_ipv6 (struct route_ipv6 *r6, const struct tuntap *tt, unsigned int fla 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 + */ + 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); + argv_printf_cat (&argv, " METRIC %d", r->metric); #endif argv_msg (D_ROUTE, &argv);