[OpenWrt-Devel] netifd: adding default route + route via previous default route
n.mavrogiannopoulos at gmail.com
Sun May 15 07:14:09 EDT 2016
On Sat, 2016-05-14 at 18:29 +0800, Yousong Zhou wrote:
> On 14 May 2016 at 16:18, Nikos Mavrogiannopoulos
> <n.mavrogiannopoulos at gmail.com> wrote:
> > Hi,
> > A user of openconnect VPN is trying to use openconnect as a
> > default
> > route on his router . Currently this works by setting
> > defaultroute=1
> > on his /etc/config/network, however, once the default route is
> > setup
> > the VPN connection drops because there is no direct route to the
> > VPN
> > gateway.
> > Obviously I need to setup a /32 (or /128 for IPv6) route for the
> > VPN
> > gateway using the previous defaultroute interface. However it is
> > not
> > apparent to me how to do that via the netifd-proto.sh or the
> > functions/network.sh. Any hints? Should I use the user's suggestion
> > of
> > directly setting the route via busybox' route command?
> 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?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel