Browse Source

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>
lilik-openwrt-22.03
Yousong Zhou 8 years ago
committed by Nikos Mavrogiannopoulos
parent
commit
4034e9ee21
2 changed files with 4 additions and 2 deletions
  1. +1
    -1
      net/openconnect/Makefile
  2. +3
    -1
      net/openconnect/files/openconnect.sh

+ 1
- 1
net/openconnect/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=openconnect
PKG_VERSION:=7.08
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_USE_MIPS16:=0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz


+ 3
- 1
net/openconnect/files/openconnect.sh View File

@ -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"


Loading…
Cancel
Save