aboutsummaryrefslogtreecommitdiff
path: root/net/openconnect/files
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2017-05-08 13:07:23 +0800
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-06-18 13:10:34 +0200
commit4034e9ee2149f6e873326cca9e7218a04df7c5e8 (patch)
tree3243a310015bfe4d9217102ee555776d0f967abe /net/openconnect/files
parent4b3fde326c796f6a4f206edf6ed1dc4adf4223ea (diff)
openconnect: new option mtu
According to openconnect --help output: -m, --mtu=MTU Request MTU from server --base-mtu=MTU Indicate path MTU to/from server Fixes #2099 by allowing setting tunnel mtu Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'net/openconnect/files')
-rwxr-xr-xnet/openconnect/files/openconnect.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index 4fd397894..0e3d90ab4 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -6,6 +6,7 @@ init_proto "$@"
proto_openconnect_init_config() {
proto_config_add_string "server"
proto_config_add_int "port"
+ proto_config_add_int "mtu"
proto_config_add_string "username"
proto_config_add_string "serverhash"
proto_config_add_string "authgroup"
@@ -22,7 +23,7 @@ proto_openconnect_init_config() {
proto_openconnect_setup() {
local config="$1"
- json_get_vars server port username serverhash authgroup password password2 token_mode token_secret os csd_wrapper
+ json_get_vars server port username serverhash authgroup password password2 token_mode token_secret os csd_wrapper mtu
grep -q tun /proc/modules || insmod tun
ifname="vpn-$config"
@@ -38,6 +39,7 @@ proto_openconnect_setup() {
[ -n "$port" ] && port=":$port"
cmdline="$server$port -i "$ifname" --non-inter --syslog --script /lib/netifd/vpnc-script"
+ [ -n "$mtu" ] && cmdline="$cmdline --mtu $mtu"
# migrate to standard config files
[ -f "/etc/config/openconnect-user-cert-vpn-$config.pem" ] && mv "/etc/config/openconnect-user-cert-vpn-$config.pem" "/etc/openconnect/user-cert-vpn-$config.pem"