Hi, On Mon, Nov 09, 2015 at 04:35:09PM +0200, Lev Stipakov wrote: > v2: > * Remove netsh call which uses adapter name. After thoughtful testing > turns out that "adapter name" code branch is never used.
Not there yet :-) - but thanks for picking this up. As I said for v1, if we change this for the "set address" part of the code, because "it will sometimes not work otherwise", we should also change it for the "set route" code - consistent usage of netsh, easier to understand when reading the log, etc. It should actually be not very hard - we should be able to set "tt->actual" to read "interface=nnn", and then it should work automagically without even touching route.c at all > - /* example: netsh interface ipv6 set address MyTap 2001:608:8003::d > store=active */ > + /* example: netsh interface ipv6 set address 42 2001:608:8003::d > store=active */ What does surprise me, though, is that it works for you with just specifying the interface index, without "IF" or "interface=" before it. When setting IPv6 routes for non-tun/tap gateways (route.c, line 1770, in git master) I use "interface=<ifindex>" and that is what the online help told me to use. struct buffer out = alloc_buf_gc (64, &gc); buf_printf (&out, "interface=%d", r6->adapter_index ); device = buf_bptr(&out); ... argv_printf (&argv, "%s%sc interface ipv6 add route %s/%d %s", get_win_sys_path(), NETSH_PATH_SUFFIX, network, r6->netbits, device); is the syntax different for "set address"? (IPv4 code uses "IF <index>"... hrmph) gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
signature.asc
Description: PGP signature