[PATCH 1/4] Support routes with different devs and gateways

David Woodhouse dwmw2 at infradead.org
Tue Oct 17 01:04:00 PDT 2017


On Wed, 2017-10-11 at 22:39 +0200, Gernot Hillier wrote:
> Extend the *_network_route helper functions by parameters to specify device
> and, optionally, gateway for the route.

Is this tested in *BSD, Solaris, OSX, etc?


> @@ -248,7 +248,12 @@ if [ -n "$IPROUTE" ]; then
>  		NETWORK="$1"
>  		NETMASK="$2"
>  		NETMASKLEN="$3"
> -		$IPROUTE route replace "$NETWORK/$NETMASKLEN" dev "$TUNDEV"
> +		NETDEV="$4"
> +		if [ -n "$5" ]; then
> +			$IPROUTE route replace "$NETWORK/$NETMASKLEN" dev "$NETDEV" via "$5"

Can you assign $5 to a local variable and use it from there, like we do
for $1-$4? 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4938 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20171017/e7dc8af9/attachment.bin>


More information about the openconnect-devel mailing list