[PATCH 1/4] Support routes with different devs and gateways
Gernot Hillier
gernot.hillier at siemens.com
Tue Oct 17 01:35:52 PDT 2017
Dear David!
Thanks for reviewing!
Am 17.10.2017 um 10:04 schrieb David Woodhouse:
> 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?
Nope, sorry, only Linux (and Windows) machines here. I forced it to use
/sbin/route instead of /sbin/ip, so the /sbin/route code should work as
intended.
But there should be Siemens colleagues with OSX or *BSD wanting to test
it, I'll ask around.
>> @@ -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?
Sure, will rework it for v2 of series.
--
Gernot
More information about the openconnect-devel
mailing list