David Woodhouse [Tue, 13 Dec 2011 23:39:14 +0000 (23:39 +0000)]
No need to add link-local address on Solaris.
Revert commit 9e277b5e64315aa3e1a2f2472e9c2d55f9b0f788. Now that we plumb
the interface from openconnect instead of with ifconfig from vpnc-script,
the issues with link-local addresses no longer seem to bother us.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Antonio Borneo [Mon, 12 Dec 2011 20:39:06 +0000 (04:39 +0800)]
vpnc-script: fix for Suse pre 11.1
To handle /etc/resolv.conf file, Suse Linux pre 11.1
uses /sbin/modify_resolvconf script.
The same parameter "-s <service>" have to be passed
to modify_resolvconf on both "modify" and "restore".
Original vpnc-script.in from vpnc project runs:
/sbin/modify_resolvconf modify -s $SCRIPTNAME ...
/sbin/modify_resolvconf restore -s vpnc ...
with $SCRIPTNAME=="vpnc".
In this repository, vpnc-script.in has been converted
to vpnc-script. Doing this, the value $SCRIPTNAME has
changed from "vpnc" to "vpnc-script".
This breaks the "restore" and left /etc/resolv.conf
modified for the (already closed) VPN tunnel.
Replace "-s $SCRIPTNAME" with fixed value "-s vpnc".
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Fred Wittekind IV [Sun, 4 Sep 2011 22:10:40 +0000 (23:10 +0100)]
Fix MTU calculation (Red Hat bug #693235)
Newer iproute doesn't give the mtu in 'ip route get' output, so get the
device and then get the device's MTU (which theoretically could be
different to the route MTU but this is good enough for now).
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Dave Reisner [Mon, 15 Aug 2011 00:01:24 +0000 (20:01 -0400)]
vpnc-script: prevent negative MTU
We can't be sure that the route shown by 'ip route get' will return
anything. Restructure the logic to only perform the subtraction if it
does. Otherwise, fall back to the default 1412.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Bernhard Schmidt [Tue, 23 Feb 2010 18:11:53 +0000 (18:11 +0000)]
Set route to VPN gateway before configuring tunnel
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>