openvpn: add possibility to set param "compress" without algorithm 19756/head
authorMartin Schiller <ms@dev.tdt.de>
Tue, 14 Jan 2020 14:20:14 +0000 (15:20 +0100)
committerMartin Schiller <ms@dev.tdt.de>
Mon, 31 Oct 2022 13:22:17 +0000 (14:22 +0100)
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>
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