Hi, On Sun, Mar 06, 2016 at 03:17:40PM -0500, Selva Nair wrote: > There at least two more things on windows that the interactive service has > to support: > > (i) register-dns
Indeed, this seems to be missing today.
> (ii) ipv6 address and route setup
>
> Is there anything else? For (ii) can't it be done using the IP Helper API
> on vista+ -- is the use of net command required? If not, it should be easy
> to delegate it to the service.
... but this should all be nicely done...?
tun.c, around line 1390:
if (tt->options.msg_channel)
{
do_address_service (true, AF_INET6, tt);
}
else
{
/* example: netsh interface ipv6 set address interface=42 2001:608:8
003::d store=active */
and route.c, add_route_ipv6()
...
#elif defined (WIN32)
if (tt->options.msg_channel)
status = add_route_ipv6_service (r6, tt);
else
...
Looking at interactive.c, "HandleAddressMessage()" uses
CreateUnicastIpAddressEntry(), which according to my reading of MSDN
supports IPv4 and IPv6. It's filled using "sockaddr_inet()", which
actually does IPv4 and IPv6 even if the name doesn't suggest so:
static SOCKADDR_INET
sockaddr_inet (short family, inet_address_t *addr)
{
SOCKADDR_INET sa_inet;
ZeroMemory (&sa_inet, sizeof (sa_inet));
sa_inet.si_family = family;
if (family == AF_INET)
sa_inet.Ipv4.sin_addr = addr->ipv4;
else if (family == AF_INET6)
sa_inet.Ipv6.sin6_addr = addr->ipv6;
return sa_inet;
}
So, we should be fine - and I'm fairly sure it actually works as one of
my test cases was "unprivileged user, iservice, VPN tunnel has IPv6".
Now, I have no clue whether this might be a deprecated API, and something
in the IP Helper API suite is "better" - just pointing out that we seem
to be actually fine regarding IPv6 address and route.
(HandleRouteMessage() uses CreateIpForwardEntry2(), so that's also
IPv4+IPv6)
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]
fax: +49-89-35655025 [email protected]
signature.asc
Description: PGP signature
