Hi, On Wed, Nov 11, 2015 at 10:05:11AM +0200, Lev Stipakov wrote: > > > > 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 > > Setting "interface=<idx>" to "tt->actual_name" will affect all code > branches which use that value, for example "netsh_enable_dhcp". In this > particular case we cannot use index and must use interface name, > according to MS > (https://technet.microsoft.com/en-us/library/cc731521(v=ws.10).aspx#BKMK_setaddress)
Uh. Thanks for investigating. Why, oh why... it was naive of me to expect consistency here, I should have known better :-( [..] > So, if we want to use index also for "add/del route", I'd gently modify > add/del_route_ipv6 and make it use "interface=<idx>" (without breaking > "vpn server special route" case). For consistency, I think we should do that. What I'd avoid is to do the adapter_index lookup for every single route - which would imply adding the index to struct tuntap_options or something like that which is available in add/del_route[_ipv6]() already. But this is less elegant than I hoped for, and might have to look different for 2.3 and master. So maybe make this a separate patch? > > What does surprise me, though, is that it works for you with just specifying > > the interface index, without "IF" or "interface=" before it. > > > > MS says "[[ interface=] String] Specifies an interface name or index" > for "set address" and "add route". If I read it right, "interface" > prefix can be omitted. But let's use it for consistency with existing code. ... and make this ("interface=<idx>") a v3 patch, only for "set address" for now, to move forward. thanks, 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