]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
Fix set_vpngateway_route
authorDaniel Lenski <dlenski@gmail.com>
Wed, 14 Jul 2021 18:51:19 +0000 (11:51 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 14 Jul 2021 18:51:19 +0000 (11:51 -0700)
Should fix #23

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
vpnc-script

index ea609d9814da5908bf95543e64a26e2ef2aedc5b..6b6ae7b8f0c55d85a672cb285dd60094cb8f6bee 100755 (executable)
@@ -265,7 +265,7 @@ if [ -n "$IPROUTE" ]; then
        set_vpngateway_route() {
                # We'll attempt to add a host route to the gateway through every route that matches
                # its address (excluding those through TUNDEV because the goal is to avoid loopback).
-               echo "$1" | grep -q : && FAMILY=-6 || FAMILY=-4
+               echo "$VPNGATEWAY" | grep -q : && FAMILY=-6 || FAMILY=-4
 
                list_non_loopback_routes "$VPNGATEWAY" |
                while read LINE ; do