openconnect: add support for option --pfs 22404/head
authorVladislav Grigoryev <vg.aetera@gmail.com>
Sat, 14 Oct 2023 09:25:34 +0000 (12:25 +0300)
committerVladislav Grigoryev <vg.aetera@gmail.com>
Sat, 14 Oct 2023 12:30:15 +0000 (15:30 +0300)
Add support for the OpenConnect option `--pfs`.
Designed to require perfect forward secrecy.

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
net/openconnect/Makefile
net/openconnect/files/openconnect.sh

index e4c776726501b137271b7b9af55f0e34de5be62c..1ec7d70d2d2dca73dac9187712777e99d7f517de 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openconnect
 PKG_VERSION:=9.01
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/openconnect/
index 25fb7d542468b2e4cf5a7446541a356a9936caec..d318b97e0d455cb8f5a0c7247e56b832380e17a4 100755 (executable)
@@ -20,6 +20,7 @@ proto_openconnect_init_config() {
        proto_config_add_int "juniper"
        proto_config_add_int "reconnect_timeout"
        proto_config_add_string "vpn_protocol"
+       proto_config_add_boolean "pfs"
        proto_config_add_boolean "no_dtls"
        proto_config_add_string "interface"
        proto_config_add_string "username"
@@ -58,6 +59,7 @@ proto_openconnect_setup() {
                os \
                password \
                password2 \
+               pfs \
                port \
                proxy \
                reconnect_timeout \
@@ -84,6 +86,7 @@ proto_openconnect_setup() {
        [ -n "$port" ] && port=":$port"
 
        append_args "$server$port" -i "$ifname" --non-inter --syslog --script /lib/netifd/vpnc-script
+       [ "$pfs" = 1 ] && append_args --pfs
        [ "$no_dtls" = 1 ] && append_args --no-dtls
        [ -n "$mtu" ] && append_args --mtu "$mtu"