openvpn: add possibility to set param "compress" without algorithm
authorMartin Schiller <ms@dev.tdt.de>
Tue, 14 Jan 2020 14:20:14 +0000 (15:20 +0100)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Sat, 27 Apr 2024 09:53:35 +0000 (11:53 +0200)
In some situations you need to set the compress param without an
algorithm. Compression will be turned off, but the packet framing for
compression will still be enabled, allowing a different setting to be
pushed later.

As it is not possible to have options with optional values at the
moment, I've introduced a pseudo value "frames_only" which will be
removed in the init script.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(cherry picked from commit 5ce5220eb23ffdfcce74541f07cff4fb3a3ade08)

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

index 489145327296d759c116a49342db35b2df4420f6..3e845e94d6b9edc31a99265c49a2675096b12666 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=openvpn
 
 PKG_VERSION:=2.5.7
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=\
        https://build.openvpn.net/downloads/releases/ \
index f7dc006ce37eaf990c99cbbfa8fa00afffc6b041..380b423495cc3d9564aa26fd5d748a8457108685 100644 (file)
@@ -42,6 +42,7 @@ append_params() {
                config_get v "$s" "$p"
                IFS="$LIST_SEP"
                for v in $v; do
+                       [ "$v" = "frames_only" ] && [ "$p" = "compress" ] && unset v && append_param "$s" "$p" && echo >> "/var/etc/openvpn-$s.conf"
                        [ -n "$v" ] && [ "$p" != "push" ] && append_param "$s" "$p" && echo " $v" >> "/var/etc/openvpn-$s.conf"
                        [ -n "$v" ] && [ "$p" = "push" ] && append_param "$s" "$p" && echo " \"$v\"" >> "/var/etc/openvpn-$s.conf"
                done