
jengelh at medozas
Nov 14, 2009, 4:40 AM
Post #1 of 1
(813 views)
Permalink
|
|
vpnc: fix incorrect order of tunnel setup
|
|
Patch for vpnc trunk. ---8<--- vpnc: fix incorrect order of tunnel setup In my setup, the default route is changed to point to the tunnel, which is ok. However, our VPN gateway also sends an extar route for the network it is contained within. Because vpnc-script configures the tunnel first before setting the gateway host route, `ip route get` that is executed inside set_vpngateway_route resolves to the tunnel itself, which is wrong: ip addr add 134.76.2.203/32 dev tun0 ip route add 134.76.0.0/16 dev tun0 ip route add 134.76.22.1/32 dev `ip route get 134.76.22.1 ...` == ip route add 134.76.22.1/32 dev tun0 When it should have been ip route add 134.76.22.1/32 dev eth0 This problem did not show up before r365 (but it existed!), because the /16 network route was previously never added due to the missing space bug in vpnc-script that was fixed in r365. Signed-off-by: Jan Engelhardt <jengelh [at] medozas> --- vpnc-script.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: vpnc-0.5.2r394/vpnc-script.in =================================================================== --- vpnc-0.5.2r394.orig/vpnc-script.in +++ vpnc-0.5.2r394/vpnc-script.in @@ -434,8 +434,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 # created with quilt _______________________________________________ vpnc-devel mailing list vpnc-devel [at] unix-ag https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel http://www.unix-ag.uni-kl.de/~massar/vpnc/
|