Openvpn: add missing script-security
authorErik Conijn <egc112@msn.com>
Wed, 17 Jan 2024 12:31:37 +0000 (13:31 +0100)
committerRosen Penev <rosenp@gmail.com>
Mon, 5 Feb 2024 00:08:36 +0000 (16:08 -0800)
Maintainer:  @neheb

Compile tested: armv7, cortexA15, OpenWRT 23.05
Run tested: Linksys EA8500

Compile tested: armv8, cortexA53, OpenWRT main
Run tested: Dynalink DL-WRX36

Description:
Script-security is always 2 and cannot be changed from the openvpn config file due to a missing rule in openvpn.init.

This is discussed in issue #23014

This patch adds the missing rule in openvpn.init to parse script-security from the openvpn config file.

Signed-off-by: Erik Conijn <egc112@msn.com>
(cherry picked from commit 7b40d179bcd04a1f3b5b794fd952ef431c833cad)

net/openvpn/Makefile
net/openvpn/files/openvpn.init

index 2103c897e08e5b99e1fc4a98c33c626dba748317..20a468a1a9940ad0c9eae89ab3c21b436320c2eb 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=openvpn
 
 PKG_VERSION:=2.5.8
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE_URL:=\
        https://build.openvpn.net/downloads/releases/ \
index a94fe6b690d5594c528da631df039b909b5e47b7..de0f85aa05c72e58735caf604e4b1bd38b38bea1 100644 (file)
@@ -200,6 +200,7 @@ start_instance() {
 
        if [ ! -z "$config" ]; then
                append UCI_STARTED "$config" "$LIST_SEP"
+               [ -n "$script_security" ] || get_openvpn_option "$config" script_security script-security
                [ -n "$up" ] || get_openvpn_option "$config" up up
                [ -n "$down" ] || get_openvpn_option "$config" down down
                [ -n "$route_up" ] || get_openvpn_option "$config" route_up route-up