Previously, a split tunnel with a /128 request would result in a default
tunnel, rather than a specific route.
Correctly set the default route if we request a /0.
Signed-off-by: Alexander Huynh <alex@grande.coffee>
while [ $i -lt $CISCO_IPV6_SPLIT_INC ] ; do
eval NETWORK="\${CISCO_IPV6_SPLIT_INC_${i}_ADDR}"
eval NETMASKLEN="\${CISCO_IPV6_SPLIT_INC_${i}_MASKLEN}"
- if [ $NETMASKLEN -lt 128 ]; then
- set_ipv6_network_route "$NETWORK" "$NETMASKLEN" "$TUNDEV"
- else
+ if [ $NETMASKLEN -eq 0 ]; then
set_ipv6_default_route
+ else
+ set_ipv6_network_route "$NETWORK" "$NETMASKLEN" "$TUNDEV"
fi
i=`expr $i + 1`
done