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

Yousong Zhou yszhou4tech at gmail.com
Sat May 14 06:29:47 EDT 2016


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 [0]. 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.

                yousong

> regards,
> Nikos
>
> [0]. https://github.com/openwrt/packages/issues/2548
> [1]. https://github.com/openwrt/packages/blob/master/net/vpnc-scripts/files/vpnc-script
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
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