From: Martin Schiller Date: Tue, 14 Jan 2020 14:20:14 +0000 (+0100) Subject: openvpn: add possibility to set param "compress" without algorithm X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5ce5220eb23ffdfcce74541f07cff4fb3a3ade08;p=feed%2Fpackages.git openvpn: add possibility to set param "compress" without algorithm 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 --- diff --git a/net/openvpn/Makefile b/net/openvpn/Makefile index 4891453272..3e845e94d6 100644 --- a/net/openvpn/Makefile +++ b/net/openvpn/Makefile @@ -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/ \ diff --git a/net/openvpn/files/openvpn.init b/net/openvpn/files/openvpn.init index f7dc006ce3..380b423495 100644 --- a/net/openvpn/files/openvpn.init +++ b/net/openvpn/files/openvpn.init @@ -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