]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
Set route to VPN gateway before configuring tunnel
authorBernhard Schmidt <berni@birkenwald.de>
Tue, 23 Feb 2010 18:11:53 +0000 (18:11 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 23 Feb 2010 18:11:53 +0000 (18:11 +0000)
In some circumstances (with $VPNGATEWAY being inside of
$INTERNAL_IP4_ADDRESS/$INTERNAL_IP4_NETMASK, for example when the netmask
was set incorrectly) the hostroute to $VPNGATEWAY pointed to the
tunnel device, creating a routing recursion.

Set the host route before configuring the tun interface to fix this.

Signed-off-by: Bernhard Schmidt <berni@birkenwald.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
vpnc-script

index f110657e2d4cda039df02c631af7e836ebe97ebb..cc6299767ef99d5ddcf5a5e9d0da0eb4eed56e1a 100755 (executable)
@@ -520,8 +520,8 @@ do_connect() {
                echo
        fi
 
-       do_ifconfig
        set_vpngateway_route
+       do_ifconfig
        if [ -n "$CISCO_SPLIT_INC" ]; then
                i=0
                while [ $i -lt $CISCO_SPLIT_INC ] ; do