aboutsummaryrefslogtreecommitdiff
path: root/package/openvpn
diff options
context:
space:
mode:
Diffstat (limited to 'package/openvpn')
-rw-r--r--package/openvpn/Config.in2
-rw-r--r--package/openvpn/S60openvpn14
-rw-r--r--package/openvpn/openvpn.hash4
-rw-r--r--package/openvpn/openvpn.mk26
4 files changed, 23 insertions, 23 deletions
diff --git a/package/openvpn/Config.in b/package/openvpn/Config.in
index 0a1675573a..3f4a617fb7 100644
--- a/package/openvpn/Config.in
+++ b/package/openvpn/Config.in
@@ -1,7 +1,7 @@
config BR2_PACKAGE_OPENVPN
bool "openvpn"
depends on BR2_USE_MMU # fork()
- select BR2_PACKAGE_OPENSSL
+ select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS
help
OpenVPN is a full-featured SSL VPN solution which can
accomodate a wide range of configurations, including road
diff --git a/package/openvpn/S60openvpn b/package/openvpn/S60openvpn
index bc1ab01c1a..f097cf11ec 100644
--- a/package/openvpn/S60openvpn
+++ b/package/openvpn/S60openvpn
@@ -11,13 +11,15 @@ CONFIG_DIR=/etc/openvpn
test -d $CONFIG_DIR || exit 0
start_vpn () {
- /usr/sbin/openvpn --daemon --writepid /var/run/openvpn.$NAME.pid \
- --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || printf " FAILED->"
- printf " $NAME"
+ printf " $NAME "
+ start-stop-daemon -S -p /var/run/openvpn.$NAME.pid -x /usr/sbin/openvpn -- \
+ --daemon --writepid /var/run/openvpn.$NAME.pid \
+ --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR
+ [ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop_vpn () {
- kill `cat $PIDFILE` || true
- rm $PIDFILE
+ printf " $NAME "
+ start-stop-daemon -K -p /var/run/openvpn.$NAME.pid -x /usr/sbin/openvpn
}
case "$1" in
@@ -48,7 +50,6 @@ stop)
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
- printf " $NAME"
done
else
if test -e /var/run/openvpn.$2.pid ; then
@@ -56,7 +57,6 @@ stop)
NAME=`echo $PIDFILE | cut -c18-`
NAME=${NAME%%.pid}
stop_vpn
- printf " $NAME"
else
printf " No such VPN: $2"
fi
diff --git a/package/openvpn/openvpn.hash b/package/openvpn/openvpn.hash
index b9b0a4d8d5..4e371fc87b 100644
--- a/package/openvpn/openvpn.hash
+++ b/package/openvpn/openvpn.hash
@@ -1,3 +1,3 @@
# Locally calculated after checking signature
-sha256 641f3add8694b2ccc39fd4fd92554e4f089ad16a8db6d2b473ec284839a5ebe2 openvpn-2.4.9.tar.xz
-sha256 1fcb78d7e478bb8a9408010bdc91b36e213b1facfad093df3f7ce7e28af19043 COPYRIGHT.GPL
+sha256 029a426e44d656cb4e1189319c95fe6fc9864247724f5599d99df9c4c3478fbd openvpn-2.5.0.tar.xz
+sha256 1fcb78d7e478bb8a9408010bdc91b36e213b1facfad093df3f7ce7e28af19043 COPYRIGHT.GPL
diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk
index 4234675d9f..7c67e95074 100644
--- a/package/openvpn/openvpn.mk
+++ b/package/openvpn/openvpn.mk
@@ -4,20 +4,17 @@
#
################################################################################
-OPENVPN_VERSION = 2.4.9
+OPENVPN_VERSION = 2.5.0
OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz
OPENVPN_SITE = http://swupdate.openvpn.net/community/releases
-OPENVPN_DEPENDENCIES = host-pkgconf openssl
+OPENVPN_DEPENDENCIES = host-pkgconf
OPENVPN_LICENSE = GPL-2.0
OPENVPN_LICENSE_FILES = COPYRIGHT.GPL
+OPENVPN_CPE_ID_VENDOR = openvpn
OPENVPN_CONF_OPTS = \
- --enable-iproute2 \
- --with-crypto-library=openssl \
+ --disable-unit-tests \
$(if $(BR2_STATIC_LIBS),--disable-plugins)
-OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \
- NETSTAT=/bin/netstat \
- ROUTE=/sbin/route \
- IPROUTE=/sbin/ip
+OPENVPN_CONF_ENV = NETSTAT=/bin/netstat
ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y)
OPENVPN_CONF_OPTS += \
@@ -51,6 +48,14 @@ else
OPENVPN_CONF_OPTS += --disable-plugin-auth-pam
endif
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+OPENVPN_DEPENDENCIES += openssl
+OPENVPN_CONF_OPTS += --with-crypto-library=openssl
+else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
+OPENVPN_DEPENDENCIES += mbedtls
+OPENVPN_CONF_OPTS += --with-crypto-library=mbedtls
+endif
+
ifeq ($(BR2_PACKAGE_PKCS11_HELPER),y)
OPENVPN_DEPENDENCIES += pkcs11-helper
OPENVPN_CONF_OPTS += --enable-pkcs11
@@ -65,11 +70,6 @@ else
OPENVPN_CONF_OPTS += --disable-systemd
endif
-define OPENVPN_INSTALL_TARGET_CMDS
- $(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \
- $(TARGET_DIR)/usr/sbin/openvpn
-endef
-
define OPENVPN_INSTALL_INIT_SYSV
$(INSTALL) -m 755 -D package/openvpn/S60openvpn \
$(TARGET_DIR)/etc/init.d/S60openvpn