Hi,
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.
Adding the index - you probably meant to "struct tuntap"?
Master has member "adapter_index", which seems to be used for "special
case", release/2.3 does not have that.
Do you think it is safe to store adapter index there (would have to add
it to 2.3) without breaking "special case"? I personally not so sure,
since that "adapter_index" is obtained via "adapter_index_of_ip" in
tun.c, which looks quite different from "get_adapter_index_flexible".
We might have a semantic problem here.
-Lev