git.iko.soy/typeable/nixpkgs
on master help sign in
vpnc: patch to not set a default route when a netmask is given

also, fix the name attribute in the nix expression

commit167383c7bff40cc3bc6371808291307e08997b03 authorThomas Strobel <ts468@cam.ac.uk> dateSun 6 Sep 2015, 19:20 (11 years ago) parent092a5ee
2 files changed+14−2
pkgs/tools/networking/vpnc/default.nix+2−2 pkgs/tools/networking/vpnc/no_default_route_when_netmask.patch+12
pkgs/tools/networking/vpnc/default.nix+2−2
@@ -1,7 +1,7 @@
11{ stdenv, fetchsvn, nettools, libgcrypt, openssl, openresolv, perl, gawk, makeWrapper }:
22
33stdenv.mkDerivation rec {
4− name = "vpnc-rev550";
4+ name = "vpnc-0.5.3-post-r550";
55 src = fetchsvn {
66 url = "http://svn.unix-ag.uni-kl.de/vpnc";
77 rev = "550";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
1313 rm -r $sourceRoot/{trunk,branches,tags}
1414 '';
1515
16− patches = [ ./makefile.patch ];
16+ patches = [ ./makefile.patch ./no_default_route_when_netmask.patch ];
1717
1818 # The `etc/vpnc/vpnc-script' script relies on `which' and on
1919 # `ifconfig' as found in net-tools (not GNU Inetutils).
pkgs/tools/networking/vpnc/no_default_route_when_netmask.patchnew file+12
@@ -0,0 +1,12 @@
1+diff -uNr a/vpnc-script b/vpnc-script
2+--- a/vpnc-script 2015-09-06 13:19:11.408661526 +0200
3++++ b/vpnc-script 2015-09-06 14:47:40.260871556 +0200
4+@@ -647,7 +647,7 @@
5+ echo "$i" | grep : >/dev/null || \
6+ set_network_route "$i" "255.255.255.255" "32"
7+ done
8+- elif [ -n "$INTERNAL_IP4_ADDRESS" ]; then
9++ elif [ -n "$INTERNAL_IP4_ADDRESS" -a -z "$INTERNAL_IP4_NETMASK" ]; then
10+ set_default_route
11+ fi
12+ if [ -n "$CISCO_IPV6_SPLIT_INC" ]; then