pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
vpnc package updated to unreleased r550 of 0.53. Matches Debian.
Module Name: pkgsrc-wip
Committed By: Gianni D'Aprile <giannidaprile+pkgsrc-wip%gmail.com@localhost>
Pushed By: giannidaprile
Date: Thu Dec 31 09:45:53 2015 -0600
Changeset: d2b678c47825808e1060612bb22693dbabcc9909
Added Files:
vpnc/DESCR
vpnc/Makefile
vpnc/PLIST
vpnc/distinfo
vpnc/files/vpnc.sh
vpnc/options.mk
vpnc/patches/patch-config.c
vpnc/patches/patch-config.h
vpnc/patches/patch-makeman.pl
vpnc/patches/patch-pcf2vpnc
vpnc/patches/patch-sysdep.c
vpnc/patches/patch-tunip.c
vpnc/patches/patch-vpnc-disconnect
vpnc/patches/patch-vpnc.c
vpnc/patches/patch-vpnc_script
Log Message:
vpnc package updated to unreleased r550 of 0.53. Matches Debian.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d2b678c47825808e1060612bb22693dbabcc9909
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
vpnc/DESCR | 8 ++++
vpnc/Makefile | 75 +++++++++++++++++++++++++++++++++
vpnc/PLIST | 11 +++++
vpnc/distinfo | 14 +++++++
vpnc/files/vpnc.sh | 18 ++++++++
vpnc/options.mk | 17 ++++++++
vpnc/patches/patch-config.c | 86 ++++++++++++++++++++++++++++++++++++++
vpnc/patches/patch-config.h | 13 ++++++
vpnc/patches/patch-makeman.pl | 8 ++++
vpnc/patches/patch-pcf2vpnc | 10 +++++
vpnc/patches/patch-sysdep.c | 35 ++++++++++++++++
vpnc/patches/patch-tunip.c | 34 +++++++++++++++
vpnc/patches/patch-vpnc-disconnect | 13 ++++++
vpnc/patches/patch-vpnc.c | 31 ++++++++++++++
vpnc/patches/patch-vpnc_script | 62 +++++++++++++++++++++++++++
15 files changed, 435 insertions(+)
diffs:
diff --git a/vpnc/DESCR b/vpnc/DESCR
new file mode 100644
index 0000000..57222de
--- /dev/null
+++ b/vpnc/DESCR
@@ -0,0 +1,8 @@
+A VPN client compatible with Cisco's EasyVPN equipment.
+
+vpnc is supposed to work with:
+
+ * Cisco VPN concentrator 3000 Series
+ * Cisco IOS routers
+ * Cisco PIX / ASA Security Appliances
+ * Juniper/Netscreen
diff --git a/vpnc/Makefile b/vpnc/Makefile
new file mode 100644
index 0000000..1bd4898
--- /dev/null
+++ b/vpnc/Makefile
@@ -0,0 +1,75 @@
+# $NetBSD: Makefile,v 1.37 2014/05/29 23:37:13 wiz Exp $
+#
+
+PKGNAME= vpnc-0.5.3r550
+DISTNAME= vpnc_0.5.3r550.orig
+CATEGORIES= net security
+MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/v/vpnc/}
+LICENSE= gnu-gpl-v2
+
+WRKSRC= ${WRKDIR}/${PKGNAME}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= http://www.unix-ag.uni-kl.de/~massar/vpnc/
+COMMENT= Client for Cisco3000 VPN Concentrator
+
+NOT_FOR_PLATFORM= Interix-*-*
+
+
+USE_TOOLS+= gmake
+USE_TOOLS+= perl
+INSTALLATION_DIRS= bin sbin ${PKGMANDIR}/man1 ${PKGMANDIR}/man8 \
+ share/doc/vpnc share/examples/vpnc
+OWN_DIRS= ${PKG_SYSCONFDIR}/vpnc
+
+SUBST_CLASSES+= paths
+SUBST_MESSAGE.paths= fixing pathnames
+SUBST_STAGE.paths= post-patch
+SUBST_FILES.paths= config.c vpnc-script.in makeman.pl pcf2vpnc
+SUBST_FILES.paths+= vpnc.8.template vpnc-disconnect
+SUBST_SED.paths= -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'
+SUBST_SED.paths+= -e 's|@PREFIX@|${PREFIX}|g'
+SUBST_SED.paths+= -e 's|@PKGMANDIR@|${PKGMANDIR}|g'
+SUBST_SED.paths+= -e 's|@VARBASE@|${VARBASE}|g'
+SUBST_SED.paths+= -e 's|@PERL5@|${PERL5}|g'
+SUBST_SED.paths+= -e 's|@SH@|${SH}|g'
+
+
+BUILD_DEFS+= VARBASE
+
+EGDIR= ${PREFIX}/share/examples/vpnc
+CONF_FILES+= ${EGDIR}/default.conf \
+ ${PKG_SYSCONFDIR}/vpnc/default.conf
+CONF_FILES_MODE= 0600
+CONF_FILES_PERMS+= ${EGDIR}/vpnc-script \
+ ${PKG_SYSCONFDIR}/vpnc/vpnc-script \
+ ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
+RCD_SCRIPTS= vpnc
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/vpnc ${DESTDIR}${PREFIX}/sbin
+ ${INSTALL_PROGRAM} ${WRKSRC}/cisco-decrypt ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/vpnc-script ${DESTDIR}${EGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/vpnc.conf ${DESTDIR}${EGDIR}/default.conf
+ ${INSTALL_SCRIPT} ${WRKSRC}/vpnc-disconnect ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKSRC}/pcf2vpnc ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/vpnc.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+ ${INSTALL_MAN} ${WRKSRC}/pcf2vpnc.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+ ${INSTALL_MAN} ${WRKSRC}/cisco-decrypt.1 \
+ ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+ ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/vpnc
+
+.include "options.mk"
+
+.include "../../mk/bsd.prefs.mk"
+
+CFLAGS.SunOS= -DLOG_PERROR=0
+
+.if ${OPSYS} == "SunOS"
+.include "../../net/solaris-tap/buildlink3.mk"
+.endif
+
+.include "../../security/gnutls/buildlink3.mk"
+.include "../../security/libgcrypt/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/vpnc/PLIST b/vpnc/PLIST
new file mode 100644
index 0000000..2a1374a
--- /dev/null
+++ b/vpnc/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.8 2014/03/11 14:05:12 jperkin Exp $
+bin/cisco-decrypt
+bin/pcf2vpnc
+bin/vpnc-disconnect
+man/man1/cisco-decrypt.1
+man/man1/pcf2vpnc.1
+man/man8/vpnc.8
+sbin/vpnc
+share/doc/vpnc/README
+share/examples/vpnc/default.conf
+share/examples/vpnc/vpnc-script
diff --git a/vpnc/distinfo b/vpnc/distinfo
new file mode 100644
index 0000000..117ca28
--- /dev/null
+++ b/vpnc/distinfo
@@ -0,0 +1,14 @@
+$NetBSD: distinfo,v 1.19 2012/05/24 09:35:53 hauke Exp $
+
+SHA1 (vpnc_0.5.3r550.orig.tar.gz) = 519fb5b09c03bde3d2a850f6b018a9ca6beba0ff
+RMD160 (vpnc_0.5.3r550.orig.tar.gz) = 0758da3256ba0f2538b33c561aa95d416ce7a0f0
+Size (vpnc_0.5.3r550.orig.tar.gz) = 128136 bytes
+SHA1 (patch-config.c) = 19034c988de3e304f6a0f295682261c668dc9229
+SHA1 (patch-config.h) = df42a8447b89a029c84a5ebfdcd8d95b5d721567
+SHA1 (patch-makeman.pl) = c3a8f9780cedf3cb1af0d299473452df1e4c85db
+SHA1 (patch-pcf2vpnc) = 614864da872977d3be9f3e5fcf67843e464f5984
+SHA1 (patch-sysdep.c) = eef69790c37a8fad66c444a2e89bd924d95e7560
+SHA1 (patch-tunip.c) = 0698acafe236b2f4de506a1849076cb009f96958
+SHA1 (patch-vpnc-disconnect) = 8db3b20f00c49210791d9bfa5dd2462468b16785
+SHA1 (patch-vpnc.c) = ad1c9e29b01ed080cdda1326371d4b162cd26460
+SHA1 (patch-vpnc_script) = 5e282d8379a5f9adca34ebf449a0f3cbb2223cfb
diff --git a/vpnc/files/vpnc.sh b/vpnc/files/vpnc.sh
new file mode 100755
index 0000000..8a53c94
--- /dev/null
+++ b/vpnc/files/vpnc.sh
@@ -0,0 +1,18 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: vpnc.sh,v 1.1 2012/10/01 00:41:27 khorben Exp $
+#
+
+# PROVIDE: vpnc
+# REQUIRE: NETWORKING
+
+[ -f /etc/rc.subr ] && . /etc/rc.subr
+
+name="vpnc"
+rcvar=$name
+command="@PREFIX@/sbin/${name}"
+pidfile="@VARBASE@/run/${name}.pid"
+vpnc_flags="--pid-file ${pidfile}"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/vpnc/options.mk b/vpnc/options.mk
new file mode 100644
index 0000000..b2531db
--- /dev/null
+++ b/vpnc/options.mk
@@ -0,0 +1,17 @@
+# $NetBSD: options.mk,v 1.3 2012/02/15 13:02:31 obache Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.openvpnc
+PKG_SUPPORTED_OPTIONS= debianmods openssl # off by default
+PKG_SUGGESTED_OPTIONS=
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/bsd.options.mk"
+.if !empty(PKG_OPTIONS:Mopenssl)
+.include "../../security/openssl/buildlink3.mk"
+SUBST_CLASSES+= openssl
+SUBST_MESSAGE.openssl= adding openssl option
+SUBST_STAGE.openssl= post-patch
+SUBST_FILES.openssl= Makefile
+SUBST_SED.openssl= -e 's/^.OPENSSL_GPL_VIOLATION/OPENSSL_GPL_VIOLATION/'
+SUBST_SED.openssl+= -e 's/^.OPENSSLLIBS/OPENSSLLIBS/'
+.endif
diff --git a/vpnc/patches/patch-config.c b/vpnc/patches/patch-config.c
new file mode 100644
index 0000000..fda6df4
--- /dev/null
+++ b/vpnc/patches/patch-config.c
@@ -0,0 +1,86 @@
+$NetBSD: patch-config.c,v 1.3 2014/02/20 20:53:59 hfath Exp $
+
+--- config.c.orig 2014-09-05 20:53:13.000000000 +0000
++++ config.c
+@@ -362,12 +362,12 @@ static const char *config_def_app_versio
+
+ static const char *config_def_script(void)
+ {
+- return "/etc/vpnc/vpnc-script";
++ return "@PKG_SYSCONFDIR@/vpnc/vpnc-script";
+ }
+
+ static const char *config_def_pid_file(void)
+ {
+- return "/var/run/vpnc.pid";
++ return "@VARBASE@/run/vpnc.pid";
+ }
+
+ static const char *config_def_vendor(void)
+@@ -375,6 +375,16 @@ static const char *config_def_vendor(voi
+ return "cisco";
+ }
+
++static const char *config_def_networks_list(void)
++{
++ return "";
++}
++
++static const char *config_def_dns_update(void)
++{
++ return "Yes";
++}
++
+ static const char *config_def_target_network(void)
+ {
+ return "0.0.0.0/0.0.0.0";
+@@ -650,6 +660,20 @@ static const struct config_names_s {
+ "path to password program or helper name\n",
+ NULL
+ }, {
++ CONFIG_DNS_UPDATE, 1, 1,
++ "--dns-update",
++ "DNSUpdate",
++ "",
++ "DEPRECATED extension from Debian",
++ config_def_dns_update
++ }, {
++ CONFIG_TARGET_NETWORKS, 1, 1,
++ "--target-networks",
++ "Target Networks",
++ NULL,
++ "DEPRECATED extension from Debian",
++ config_def_networks_list
++ }, {
+ 0, 0, 0, NULL, NULL, NULL, NULL, NULL
+ }
+ };
+@@ -658,7 +682,7 @@ static char *get_config_filename(const c
+ {
+ char *realname;
+
+- asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : "");
++ asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "@PKG_SYSCONFDIR@/vpnc/", name, add_dot_conf ? ".conf" : "");
+ return realname;
+ }
+
+@@ -894,8 +918,8 @@ void do_config(int argc, char **argv)
+ }
+
+ if (!got_conffile) {
+- read_config_file("/etc/vpnc/default.conf", config, 1);
+- read_config_file("/etc/vpnc.conf", config, 1);
++ read_config_file("@PKG_SYSCONFDIR@/vpnc/default.conf", config, 1);
++ read_config_file("@PKG_SYSCONFDIR@/vpnc.conf", config, 1);
+ }
+
+ if (!print_config) {
+@@ -1034,7 +1058,7 @@ void do_config(int argc, char **argv)
+ }
+
+ if (!config[CONFIG_IPSEC_GATEWAY])
+- error(1, 0, "missing IPSec gatway address");
++ error(1, 0, "missing IPSec gateway address");
+ if (!config[CONFIG_IPSEC_ID])
+ error(1, 0, "missing IPSec ID");
+ if (!config[CONFIG_IPSEC_SECRET])
diff --git a/vpnc/patches/patch-config.h b/vpnc/patches/patch-config.h
new file mode 100644
index 0000000..114280e
--- /dev/null
+++ b/vpnc/patches/patch-config.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-config.h,v 1.2 2014/02/20 20:53:59 hfath Exp $
+
+--- config.h.orig 2014-09-05 20:53:13.000000000 +0000
++++ config.h
+@@ -60,6 +60,8 @@ enum config_enum {
+ CONFIG_CA_FILE,
+ CONFIG_CA_DIR,
+ CONFIG_PASSWORD_HELPER,
++ CONFIG_DNS_UPDATE,
++ CONFIG_TARGET_NETWORKS,
+ LAST_CONFIG
+ };
+
diff --git a/vpnc/patches/patch-makeman.pl b/vpnc/patches/patch-makeman.pl
new file mode 100644
index 0000000..8e08e54
--- /dev/null
+++ b/vpnc/patches/patch-makeman.pl
@@ -0,0 +1,8 @@
+$NetBSD: patch-makeman.pl,v 1.2 2014/02/20 20:53:59 hfath Exp $
+
+--- makeman.pl.orig 2014-09-05 20:53:13.000000000 +0000
++++ makeman.pl
+@@ -1,2 +1,2 @@
+-#! /usr/bin/env perl
++#!@PERL5@ -w
+
diff --git a/vpnc/patches/patch-pcf2vpnc b/vpnc/patches/patch-pcf2vpnc
new file mode 100644
index 0000000..b0a0cca
--- /dev/null
+++ b/vpnc/patches/patch-pcf2vpnc
@@ -0,0 +1,10 @@
+$NetBSD: patch-pcf2vpnc,v 1.2 2014/02/20 20:53:59 hfath Exp $
+
+--- pcf2vpnc.orig 2014-09-05 20:53:13.000000000 +0000
++++ pcf2vpnc
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env perl
++#!@PERL5@
+ # Stefan Tomanek <stefan%pico.ruhr.de@localhost>
+ # updated by Wolfram Sang <ninja%the-dreams.de@localhost> on 21.10.06 and on 26.06.07
+ ##
diff --git a/vpnc/patches/patch-sysdep.c b/vpnc/patches/patch-sysdep.c
new file mode 100644
index 0000000..9110001
--- /dev/null
+++ b/vpnc/patches/patch-sysdep.c
@@ -0,0 +1,35 @@
+$NetBSD: patch-sysdep.c,v 1.2 2014/02/20 20:53:59 hfath Exp $
+
+--- sysdep.c.orig 2014-09-05 20:53:13.000000000 +0000
++++ sysdep.c
+@@ -666,7 +666,7 @@ int tun_get_hwaddr(int fd, char *dev, ui
+ }
+
+ return 0;
+-#elif defined(SIOCGIFHWADDR)
++#elif defined(SIOCGIFHWADDR) || defined(SIOCGENADDR)
+ struct ifreq ifr;
+
+ /* Use a new socket fd! */
+@@ -677,12 +677,20 @@ int tun_get_hwaddr(int fd, char *dev, ui
+ memset(&ifr, 0, sizeof(struct ifreq));
+ strncpy(ifr.ifr_name, dev, IFNAMSIZ);
+
++#if defined(SIOCGIFHWADDR) && !defined(__sun)
+ if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
+ return -1;
+ }
+
+ memcpy(hwaddr, &ifr.ifr_hwaddr.sa_data, ETH_ALEN);
+-
++#endif
++#if defined(SIOCGENADDR)
++ if (ioctl(fd, SIOCGENADDR, &ifr) < 0) {
++ return -1;
++ }
++
++ memcpy(hwaddr, &ifr.ifr_enaddr, ETH_ALEN);
++#endif
+ return 0;
+ #else
+ /* todo: implement using SIOCGLIFADDR */
diff --git a/vpnc/patches/patch-tunip.c b/vpnc/patches/patch-tunip.c
new file mode 100644
index 0000000..cf9f49d
--- /dev/null
+++ b/vpnc/patches/patch-tunip.c
@@ -0,0 +1,34 @@
+$NetBSD: patch-tunip.c,v 1.2 2014/02/20 20:53:59 hfath Exp $
+
+--- tunip.c.orig 2014-09-05 20:53:13.000000000 +0000
++++ tunip.c
+@@ -177,7 +177,8 @@ static int encap_rawip_recv(struct sa_bl
+ return -1;
+ }
+ if (r < (p->ip_hl << 2) + s->ipsec.em->fixed_header_size) {
+- logmsg(LOG_ALERT, "packet too short. got %zd, expected %d", r, (p->ip_hl << 2) + s->ipsec.em->fixed_header_size);
++ syslog(LOG_ALERT, "packet too short. got %ld, expected %ld",
++ (long) r, (long) ((p->ip_hl << 2) + s->ipsec.em->fixed_header_size));
+ return -1;
+ }
+
+@@ -216,8 +217,8 @@ static int encap_udp_recv(struct sa_bloc
+ return -1;
+ }
+ if (r < s->ipsec.em->fixed_header_size) {
+- logmsg(LOG_ALERT, "packet too short from %s. got %zd, expected %d",
+- inet_ntoa(s->dst), r, s->ipsec.em->fixed_header_size);
++ logmsg(LOG_ALERT, "packet too short from %s. got %ld, expected %ld",
++ inet_ntoa(s->dst), (long) r, (long) (s->ipsec.em->fixed_header_size));
+ return -1;
+ }
+
+@@ -879,7 +880,7 @@ static void vpnc_main_loop(struct sa_blo
+ }
+ }
+ DEBUG(2,printf("lifetime status: %ld of %u seconds used, %u|%u of %u kbytes used\n",
+- time(NULL) - s->ipsec.life.start,
++ (long)(time(NULL) - s->ipsec.life.start),
+ s->ipsec.life.seconds,
+ s->ipsec.life.rx/1024,
+ s->ipsec.life.tx/1024,
diff --git a/vpnc/patches/patch-vpnc-disconnect b/vpnc/patches/patch-vpnc-disconnect
new file mode 100644
index 0000000..ca8adb1
--- /dev/null
+++ b/vpnc/patches/patch-vpnc-disconnect
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- vpnc-disconnect.orig 2014-09-05 20:53:13.000000000 +0000
++++ vpnc-disconnect
+@@ -1,6 +1,6 @@
+-#!/bin/sh
++#!@SH@
+
+-pid=/var/run/vpnc.pid
++pid=@VARBASE@/run/vpnc.pid
+
+ if [ $# -ne 0 ]; then
+ echo "Usage: $0" 1>&2
diff --git a/vpnc/patches/patch-vpnc.c b/vpnc/patches/patch-vpnc.c
new file mode 100644
index 0000000..fc683b1
--- /dev/null
+++ b/vpnc/patches/patch-vpnc.c
@@ -0,0 +1,31 @@
+$NetBSD: patch-vpnc.c,v 1.3 2014/02/20 20:54:00 hfath Exp $
+
+--- vpnc.c.orig 2014-09-05 20:53:13.000000000 +0000
++++ vpnc.c
+@@ -389,6 +389,8 @@ static void config_tunnel(struct sa_bloc
+ {
+ setenv("VPNGATEWAY", inet_ntoa(s->dst), 1);
+ setenv("reason", "connect", 1);
++ setenv("DNS_UPDATE", config[CONFIG_DNS_UPDATE], 1);
++ setenv("TARGET_NETWORKS", config[CONFIG_TARGET_NETWORKS], 1);
+ system(config[CONFIG_SCRIPT]);
+ s_atexit_sa = s;
+ atexit(atexit_close);
+@@ -1196,7 +1198,7 @@ static struct isakmp_payload *make_our_s
+
+ static void lifetime_ike_process(struct sa_block *s, struct isakmp_attribute *a)
+ {
+- uint32_t value;
++ uint32_t value = 0;
+
+ assert(a != NULL);
+ assert(a->type == IKE_ATTRIB_LIFE_TYPE);
+@@ -1226,7 +1228,7 @@ static void lifetime_ike_process(struct
+
+ static void lifetime_ipsec_process(struct sa_block *s, struct isakmp_attribute *a)
+ {
+- uint32_t value;
++ uint32_t value = 0;
+
+ assert(a != NULL);
+ assert(a->type == ISAKMP_IPSEC_ATTRIB_SA_LIFE_TYPE);
diff --git a/vpnc/patches/patch-vpnc_script b/vpnc/patches/patch-vpnc_script
new file mode 100644
index 0000000..0d751cf
--- /dev/null
+++ b/vpnc/patches/patch-vpnc_script
@@ -0,0 +1,62 @@
+$NetBSD: patch-vpnc_script,v 1.3 2014/02/20 20:54:00 hfath Exp $
+
+--- vpnc-script.orig 2014-09-05 20:53:13.000000000 +0000
++++ vpnc-script
+@@ -77,9 +77,10 @@ PATH=/sbin:/usr/sbin:$PATH
+
+ OS="`uname -s`"
+
+-HOOKS_DIR=/etc/vpnc
+-DEFAULT_ROUTE_FILE=/var/run/vpnc/defaultroute
+-RESOLV_CONF_BACKUP=/var/run/vpnc/resolv.conf-backup
++HOOKS_DIR=$PKG_SYSCONFDIR/vpnc
++STATEDIR=@VARBASE@/run/vpnc
++DEFAULT_ROUTE_FILE=$STATEDIR/defaultroute
++RESOLV_CONF_BACKUP=$STATEDIR/resolv.conf-backup
+ SCRIPTNAME=`basename $0`
+
+ # some systems, eg. Darwin & FreeBSD, prune /var/run on boot
+@@ -162,7 +163,7 @@ do_ifconfig() {
+ fi
+
+ if [ -z "$MTU" ]; then
+- MTU=1412
++ MTU=1390
+ fi
+
+ # Point to point interface require a netmask of 255.255.255.255 on some systems
+@@ -284,11 +285,11 @@ else # use route command
+ # isn't -n supposed to give --numeric output?
+ # apperently not...
+ # Get rid of lines containing IPv6 addresses (':')
+- netstat -r -n | awk '/:/ { next; } /^(default|0\.0\.0\.0)/ { print $2; }'
++ netstat -r -n | awk '/:/ { next; } $2 ~ /^link/ { next; } /^(default|0\.0\.0\.0)/ { print $2; }'
+ }
+
+ set_vpngateway_route() {
+- route add -host "$VPNGATEWAY" $route_syntax_gw "`get_default_gw`"
++ route add -host "$VPNGATEWAY" $route_syntax_gw "`get_default_gw`" $route_syntax_interface
+ }
+
+ del_vpngateway_route() {
+@@ -622,6 +623,20 @@ do_pre_init() {
+ }
+
+ do_connect() {
++ if test "$TARGET_NETWORKS" ; then
++ i=0
++ for network in $TARGET_NETWORKS ; do
++ eval CISCO_SPLIT_INC_${i}_ADDR=`echo $network | cut -f1 -d/`
++ eval CISCO_SPLIT_INC_${i}_MASKLEN=`echo $network | cut -f2 -d/`
++ eval CISCO_SPLIT_INC_${i}_MASK=$( @PERL5@ -e '$ARGV[0]=~s,.*/,,;$m=(2**$ARGV[0]-1)<<(32-$ARGV[0]);printf "%d.%d.%d.%d\n", $m>>24 & 0xff, $m>>16 & 0xff, $m>>8 & 0xff, $m & 0xff;' $network )
++ eval CISCO_SPLIT_INC_${i}_PROTOCOL=0
++ eval CISCO_SPLIT_INC_${i}_SPORT=0
++ eval CISCO_SPLIT_INC_${i}_DPORT=0
++ i=`expr $i + 1`
++ done
++ CISCO_SPLIT_INC=$i
++ fi
++
+ if [ -n "$CISCO_BANNER" ]; then
+ echo "Connect Banner:"
+ echo "$CISCO_BANNER" | while read LINE ; do echo "|" "$LINE" ; done
Home |
Main Index |
Thread Index |
Old Index