aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2008-09-26 08:19:50 +0800
committersobomax <sobomax@FreeBSD.org>2008-09-26 08:19:50 +0800
commit1a9ba1bff7c60046cbfb33bb9470edaaef7e0063 (patch)
tree27e987e15737bf9a306b1beb286fbd8d1ad67d80 /security
parent527a51517058d3a709c88ac2f315e84a1b533d88 (diff)
downloadfreebsd-ports-gnome-1a9ba1bff7c60046cbfb33bb9470edaaef7e0063.tar.gz
freebsd-ports-gnome-1a9ba1bff7c60046cbfb33bb9470edaaef7e0063.tar.zst
freebsd-ports-gnome-1a9ba1bff7c60046cbfb33bb9470edaaef7e0063.zip
Use kldstat(8) to check for the availability of the if_tun module in the
kernel instead of checking for existance of /dev/tun. The latter causes tun(8) to allocate new instance, which is not good by itself, but also on all FreeBSD versions before the very recent -current it causes number of tun devices to grow each time the script is invoked (and it's invoked every time when vpnc makes a new connection). Bump PORTREVISION. Approved by: MAINTAINER
Diffstat (limited to 'security')
-rw-r--r--security/vpnc/Makefile2
-rw-r--r--security/vpnc/files/patch-vpnc-script23
2 files changed, 22 insertions, 3 deletions
diff --git a/security/vpnc/Makefile b/security/vpnc/Makefile
index 68f94fb21430..c395b45754b6 100644
--- a/security/vpnc/Makefile
+++ b/security/vpnc/Makefile
@@ -7,7 +7,7 @@
PORTNAME= vpnc
PORTVERSION= 0.5.1
-PORTREVISION= 6
+PORTREVISION= 7
CATEGORIES= security
MASTER_SITES= http://www.unix-ag.uni-kl.de/~massar/vpnc/ \
CRITICAL
diff --git a/security/vpnc/files/patch-vpnc-script b/security/vpnc/files/patch-vpnc-script
index d4f4e4914d41..3d183f2d96a3 100644
--- a/security/vpnc/files/patch-vpnc-script
+++ b/security/vpnc/files/patch-vpnc-script
@@ -1,5 +1,8 @@
---- vpnc-script.orig 2008-02-26 00:42:09.000000000 +0100
-+++ vpnc-script 2008-02-26 00:43:41.000000000 +0100
+
+$FreeBSD$
+
+--- vpnc-script.orig
++++ vpnc-script
@@ -56,8 +56,8 @@
;;
esac
@@ -11,3 +14,19 @@
FULL_SCRIPTNAME=/usr/local/sbin/vpnc
SCRIPTNAME=`basename $FULL_SCRIPTNAME`
+@@ -407,11 +407,13 @@
+ fi
+ fi
+ elif [ "$OS" = "FreeBSD" ]; then
+- if [ ! -e /dev/tun ]; then
++ kldstat -q -m if_tun
++ if [ ${?} != 0 ]; then
+ kldload if_tun
+ fi
+ elif [ "$OS" = "GNU/kFreeBSD" ]; then
+- if [ ! -e /dev/tun ]; then
++ kldstat -q -m if_tun
++ if [ ${?} != 0 ]; then
+ kldload if_tun
+ fi
+ elif [ "$OS" = "NetBSD" ]; then