Currently I'm having to work around by putting in a wrapper script
instead of nm-openconnect-service-openconnect-helper.

#!/bin/bash
# Routes that we want to be used by the VPN link
ROUTES="10.0.0.0/8 \
       10.96.52.0/22 \
       10.96.16.111/32 \
       ..."

# Helpers to create dotted-quad netmask strings.
MASKS[8]="255.0.0.0"
MASKS[12]="255.240.0.0"
MASKS[16]="255.255.0.0"
MASKS[18]="255.255.192.0"
MASKS[20]="255.255.240.0"
MASKS[22]="255.255.252.0"
MASKS[24]="255.255.255.0"
MASKS[32]="255.255.255.255"

export CISCO_SPLIT_INC=0

# Create environment variables that vpnc-script uses to configure network
function addroute()
{
    local ROUTE="$1"
    local ADDR=${ROUTE%%/*}
    local MASKLEN=${ROUTE##*/}
    export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_ADDR=${ADDR}
    export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_MASKLEN=${MASKLEN}
    export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_MASK=${MASKS[${MASKLEN}]}
    export CISCO_SPLIT_INC=$((${CISCO_SPLIT_INC}+1))
}

for r in $ROUTES; do
    addroute $r
done
/usr/lib/NetworkManager/nm-openconnect-service-openconnect-helper.real

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1870745

Title:
  Routes not being added by nm-openconnect-server-openconnect-helper

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager-openconnect/+bug/1870745/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to