Thanks, I think (I think!) I got it now.

1) Since we have tt->adapter_index (which temporarily disappeared from my perception of reality), no need to add new member to tuntap or tuntap_options.

2) tt->adapter_index has nothing to do with rgi->adapter_index, first one is windows adapter index (which we pass to netsh), last one is for routing (which we pass to netsh too in special case).

3) In add/del_route* we (try to) use tt->adapter_index.

Regarding master's "special case" code. Should it be something like this:

  if ( r6->adapter_index )           /* vpn server special route */
    {
      struct buffer out = alloc_buf_gc (64, &gc);
      buf_printf (&out, "interface=%d", r6->adapter_index );
      device = buf_bptr(&out);
      gateway_needed = true;
    }
  else
    {
      /* device = interface=tt->adapter_index */
    }

-Lev


Reply via email to