[OpenWrt-Devel] netifd: adding default route + route via previous default route

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Sun May 22 11:53:05 EDT 2016


On Sun, 2016-05-15 at 20:50 +0800, Yousong Zhou wrote:

> > > I remember `proto_add_host_dependency` can be used to instruct
> > > netifd
> > > to setup such a route.  But it looks like the relevant code for
> > > openconnect.sh is now commented out.
> > It was causing an infinite loop, and I could not understand through
> > code what the add_host_dependency was supposed to do. Do you have
> > any
> > information about this function?
> `proto_add_host_dependency` takes 3 arguments.
> 
>  - The 1st is the logical interface name we are adding dependency for
>  - The 2nd is the host the above interface will depend on
>  - The 3rd is also a logical interface name.  It's optional and is
> for
> explicitly specifying which logical interface the 1st argument
> depends on.
> 
> If the 3rd argument is not given, netifd will try to find the logical
> interface which provides route to to the specified host (2nd
> argument)
> and a host route will be available.  The 1st logical interface will
> also be added to the list of "users" of that logical interface and
> will be notified of it's up/down/update
> event.
> I guess the problem with openconnect.sh may be that the 3rd argument
> was using the incorrect type.  Is that `vpn-$config` meant to be a
> linux system interface name?  We can try just not passing the 3rd
> argument and see how it works.

That was most helpful, thank you. The issue seems to be addressed now.

regards,
Nikos
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list