aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorMatt Merhar <mattmerhar@protonmail.com>2019-06-22 03:05:14 -0400
committerPetr Štetiar <ynezz@true.cz>2019-07-03 07:45:00 +0200
commit1d4c4cbd20580dd211431ab58460a6eebd5e021e (patch)
treea3e7fb1878d089fb76488622041cd845ae372f1a /package/network/services
parent313444a79e9d1ced42223a9c92cb677b6e6e286e (diff)
downloadupstream-1d4c4cbd20580dd211431ab58460a6eebd5e021e.tar.gz
upstream-1d4c4cbd20580dd211431ab58460a6eebd5e021e.tar.bz2
upstream-1d4c4cbd20580dd211431ab58460a6eebd5e021e.zip
openvpn: fix handling of list options
This addresses an issue where the list option specified in /etc/config/openvpn i.e. 'tls_cipher' would instead show up in the generated openvpn-<name>.conf as 'ncp-ciphers'. For context, 'ncp_ciphers' appears after 'tls_cipher' in OPENVPN_LIST from openvpn.options. Also, the ordering of the options in the UCI config file is now preserved when generating the OpenVPN config. The two currently supported list options deal with cipher preferences. Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/openvpn/Makefile2
-rw-r--r--package/network/services/openvpn/files/openvpn.init5
2 files changed, 4 insertions, 3 deletions
diff --git a/package/network/services/openvpn/Makefile b/package/network/services/openvpn/Makefile
index f01b74d8aa..30c74789a4 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.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=\
https://build.openvpn.net/downloads/releases/ \
diff --git a/package/network/services/openvpn/files/openvpn.init b/package/network/services/openvpn/files/openvpn.init
index ebb05640d8..a7d35d1a98 100644
--- a/package/network/services/openvpn/files/openvpn.init
+++ b/package/network/services/openvpn/files/openvpn.init
@@ -53,13 +53,14 @@ append_list() {
local p; local v; local s="$1"; shift
list_cb_append() {
- v="$1:${v}"
+ v="${v}:$1"
}
for p in $*; do
+ unset v
config_list_foreach "$s" "$p" list_cb_append
+ [ -n "$v" ] && append_param "$s" "$p" && echo " ${v:1}" >> "/var/etc/openvpn-$s.conf"
done
- [ -n "$v" ] && append_param "$s" "$p" && echo " ${v%*:}" >> "/var/etc/openvpn-$s.conf"
}
section_enabled() {