]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
Fix IPv6 /128 route addition
authorAlexander Huynh <alex@grande.coffee>
Tue, 19 Mar 2019 06:18:51 +0000 (06:18 +0000)
committerDaniel Lenski <daniel.lenski@finalphasesystems.com>
Sat, 11 May 2019 00:10:05 +0000 (17:10 -0700)
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>
vpnc-script

index dafd10ce63b0d2ed4926b56cb517196f17906790..5d7ea4b1aaf3b804cf897176b7770b2a3b8262a6 100755 (executable)
@@ -881,10 +881,10 @@ do_connect() {
                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