]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/log
users/dwmw2/vpnc-scripts.git
13 years agoFix typo inside comment
Antonio Borneo [Sun, 8 Jan 2012 03:36:58 +0000 (11:36 +0800)]
Fix typo inside comment

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoAdd IPv6 new variables to comment header
Antonio Borneo [Sun, 8 Jan 2012 03:36:57 +0000 (11:36 +0800)]
Add IPv6 new variables to comment header

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoReuse function and value for default GW
Antonio Borneo [Sun, 8 Jan 2012 03:36:56 +0000 (11:36 +0800)]
Reuse function and value for default GW

Remove duplicated code to get default GW and
use existing get_default_gw().

Reuse default GW value just obtained, don't
call get_default_gw() twice.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoNo need to add link-local address on Solaris.
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>
13 years agovpnc-script: fix for Suse pre 11.1
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>
13 years agoDo not plumb interface for IPv6 on Solaris. The VPN client should do that.
David Woodhouse [Mon, 12 Dec 2011 18:16:54 +0000 (18:16 +0000)]
Do not plumb interface for IPv6 on Solaris. The VPN client should do that.

... and does, as of openconnect commit c77af62db. (vpnc doesn't do IPv6 yet)

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoManually assign link-local IPv6 addresses on Solaris
David Woodhouse [Fri, 9 Dec 2011 13:14:07 +0000 (13:14 +0000)]
Manually assign link-local IPv6 addresses on Solaris

Solaris 11 *really* wants the interface to have a link-local address, and
doesn't add one automatically.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoFix stderr redirection for 'which ip' output
David Woodhouse [Fri, 9 Dec 2011 13:13:10 +0000 (13:13 +0000)]
Fix stderr redirection for 'which ip' output

We really want to redirect stderr from 'which'; not from 'grep'.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoTidy up IPv6 address/netmask handling a little, fix netmask handling on *BSD.
David Woodhouse [Thu, 8 Dec 2011 01:04:35 +0000 (01:04 +0000)]
Tidy up IPv6 address/netmask handling a little, fix netmask handling on *BSD.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoRemove dest_address from IPv6 ifconfig for all but Solaris
David Woodhouse [Thu, 8 Dec 2011 00:55:30 +0000 (00:55 +0000)]
Remove dest_address from IPv6 ifconfig for all but Solaris

This makes OpenBSD unhappy, and it looks like OpenVPN *only* does it on
Solaris.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoAdd restorecon calls for /var/run/vpnc and /dev/net/tun (Red Hat bug #731382)
David Woodhouse [Thu, 24 Nov 2011 12:42:33 +0000 (12:42 +0000)]
Add restorecon calls for /var/run/vpnc and /dev/net/tun (Red Hat bug #731382)

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoFix calculation of MTU. Bash doesn't like numbers in quotes.
Christian Krause [Sun, 4 Sep 2011 23:21:51 +0000 (00:21 +0100)]
Fix calculation of MTU. Bash doesn't like numbers in quotes.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoFix MTU calculation (Red Hat bug #693235)
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>
13 years agoMerge branch 'vpnc-script' of git://github.com/falconindy/vpnc-scripts
David Woodhouse [Wed, 17 Aug 2011 12:58:46 +0000 (13:58 +0100)]
Merge branch 'vpnc-script' of git://github.com/falconindy/vpnc-scripts

13 years agoBe more robust with unknown 'ip route get' output.
David Woodhouse [Wed, 17 Aug 2011 10:20:24 +0000 (11:20 +0100)]
Be more robust with unknown 'ip route get' output.

Make it opt-in, not opt-out for unknown options.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agovpnc-script: use iproute to create ptp link if possible
Dave Reisner [Mon, 15 Aug 2011 00:39:11 +0000 (20:39 -0400)]
vpnc-script: use iproute to create ptp link if possible

This should make net-tools completely optional on Linux.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
13 years agovpnc-script: prevent negative MTU
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>
14 years agoCope with new kernel/iproute including ipid in route list
Alessandro Suardi [Sat, 28 May 2011 22:20:15 +0000 (23:20 +0100)]
Cope with new kernel/iproute including ipid in route list

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoSet route to VPN gateway before configuring tunnel
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>
15 years agoOnly remove IPv6 default route if we had IPv6
David Woodhouse [Mon, 25 Jan 2010 05:27:20 +0000 (18:27 +1300)]
Only remove IPv6 default route if we had IPv6

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoFix up FreeBSD support
David Woodhouse [Fri, 13 Nov 2009 16:24:00 +0000 (16:24 +0000)]
Fix up FreeBSD support

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoAdd IPv6 support for Solaris (and maybe BSD)
David Woodhouse [Fri, 13 Nov 2009 15:02:51 +0000 (15:02 +0000)]
Add IPv6 support for Solaris (and maybe BSD)

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agono grep -q on solaris
David Woodhouse [Fri, 13 Nov 2009 14:56:01 +0000 (14:56 +0000)]
no grep -q on solaris

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoHandle IPv6 nameservers (in $INTERNAL_IP4_DNS variable)
David Woodhouse [Wed, 11 Nov 2009 00:52:24 +0000 (00:52 +0000)]
Handle IPv6 nameservers (in $INTERNAL_IP4_DNS variable)

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoHandle IPv6 routes
David Woodhouse [Wed, 11 Nov 2009 00:42:28 +0000 (00:42 +0000)]
Handle IPv6 routes

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoSet IPv6 address on interface; no routes yet
David Woodhouse [Wed, 4 Nov 2009 07:34:49 +0000 (07:34 +0000)]
Set IPv6 address on interface; no routes yet

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoFix MTU when no default route
David Woodhouse [Tue, 3 Nov 2009 20:57:46 +0000 (20:57 +0000)]
Fix MTU when no default route

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525389

Patch from Jonathan Miner

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoMake basic vpnc-script work with Solaris
David Woodhouse [Tue, 3 Nov 2009 19:11:55 +0000 (19:11 +0000)]
Make basic vpnc-script work with Solaris

Add -interface flag when adding routes, specify gateway for default
route when deleting it.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agoAdd pTRTd script for NAT-PT address to VPN
David Woodhouse [Sat, 6 Jun 2009 13:45:55 +0000 (14:45 +0100)]
Add pTRTd script for NAT-PT address to VPN

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agoAdd netunshare
David Woodhouse [Sat, 6 Jun 2009 12:19:27 +0000 (13:19 +0100)]
Add netunshare

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agoset up dnsmasq in netns
David Woodhouse [Sat, 6 Jun 2009 11:55:57 +0000 (12:55 +0100)]
set up dnsmasq in netns

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agoAdd ssh-inside-vpn-namespace script
David Woodhouse [Sat, 6 Jun 2009 11:22:54 +0000 (12:22 +0100)]
Add ssh-inside-vpn-namespace script

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agoRemove the substitution in vpnc-script, to remove the need for vpnc-script.in
David Woodhouse [Sat, 6 Jun 2009 09:01:26 +0000 (10:01 +0100)]
Remove the substitution in vpnc-script, to remove the need for vpnc-script.in

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
16 years agoImport vpnc-script from vpnc
David Woodhouse [Sat, 6 Jun 2009 08:53:01 +0000 (09:53 +0100)]
Import vpnc-script from vpnc

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>