Proposing minor patch to vpnc-script, which fixes 2 problems: 1) When TUN is compiled as a module and the module is not loaded, vpnc-script doesn't attempt to load the module and directly proceeds to create /dev/net/tun manually, which doesn't work, since the device that gets created is not backed up ny the kernel. Workaround: modprobe tun before starting vpnc 2) When there's more than one default gateway with different metrics, vpnc-script correctly stores them both in a temporary file to be restored on disconnect. However, on disconnect it fails to properly restore either one of them. Workaround: manually re-add the gateways or /etc/init.d/net.eth0 restart. Example route output which causes the bug: # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 172.27.44.0 * 255.255.254.0 U 2000 0 0 wlan0 172.27.14.0 * 255.255.254.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default 172.27.14.1 0.0.0.0 UG 0 0 0 eth0 default 172.27.44.1 0.0.0.0 UG 2000 0 0 wlan0 I'm going to try and attach a patch.
Created attachment 102431 [details, diff] proposed patch for vpnc-script
Can you send that upstream?
I sent it up and Massar will integrate it. Thanks.