aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/openvpn
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-08-05 09:25:41 +0200
committerJo-Philipp Wich <jo@mein.io>2020-08-06 08:34:31 +0200
commitb92f54b919e925cf27105c22f8ffdd7585937bb1 (patch)
treecd30324d0591c56cd61668140f00a3005a4a7686 /package/network/services/openvpn
parent34553e8cc9ad4530d3f52c3423e5c52fdacac539 (diff)
downloadupstream-b92f54b919e925cf27105c22f8ffdd7585937bb1.tar.gz
upstream-b92f54b919e925cf27105c22f8ffdd7585937bb1.tar.bz2
upstream-b92f54b919e925cf27105c22f8ffdd7585937bb1.zip
openvpn: fix arguments passing to wrapped up and down scripts
With the introduction of the generic OpenVPN hotplug mechanism, wrapped --up and --down scripts got the wrong amount and order of arguments passed, breaking existing configurations and functionality. Fix this issue by passing the same amount of arguments in the same expected order as if the scripts were executed by the OpenVPN daemon directly. Ref: https://github.com/openwrt/openwrt/pull/1596#issuecomment-668935156 Fixes: 8fe9940db6 ("openvpn: add generic hotplug mechanism") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'package/network/services/openvpn')
-rw-r--r--package/network/services/openvpn/Makefile2
-rw-r--r--package/network/services/openvpn/files/etc/hotplug.d/openvpn/01-user3
2 files changed, 3 insertions, 2 deletions
diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile
index 8126b3a7c7..9482e9ce39 100644
--- a/package/network/services/openvpn/Makefile
+++ b/package/network/services/openvpn/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openvpn
PKG_VERSION:=2.4.9
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_SOURCE_URL:=\
https://build.openvpn.net/downloads/releases/ \
diff --git a/package/network/services/openvpn/files/etc/hotplug.d/openvpn/01-user b/package/network/services/openvpn/files/etc/hotplug.d/openvpn/01-user
index 86be69e805..f93823e5c5 100644
--- a/package/network/services/openvpn/files/etc/hotplug.d/openvpn/01-user
+++ b/package/network/services/openvpn/files/etc/hotplug.d/openvpn/01-user
@@ -13,7 +13,8 @@
case "$ACTION" in
up|down)
if get_openvpn_option "$config" command "$ACTION"; then
- exec /bin/sh -c "$command $ACTION $INSTANCE $*"
+ shift
+ exec /bin/sh -c "$command $*"
fi
;;
esac