diff --git a/cstp.c b/cstp.c index 42b70c85..d2fd4a62 100644 --- a/cstp.c +++ b/cstp.c @@ -238,6 +238,7 @@ static int start_cstp_connection(struct openconnect_info *vpninfo) retry: calculate_mtu(vpninfo, &base_mtu, &mtu); + vpninfo->cstp_basemtu = base_mtu; reqbuf = buf_alloc(); buf_append(reqbuf, "CONNECT /CSCOSSLC/tunnel HTTP/1.1\r\n"); @@ -484,6 +485,8 @@ static int start_cstp_connection(struct openconnect_info *vpninfo) colon); return -EINVAL; } + } else if (!strcmp(buf + 7, "Base-MTU")) { + vpninfo->cstp_basemtu = atol(colon); } else if (!strcmp(buf + 7, "MTU")) { int cstpmtu = atol(colon); if (cstpmtu > mtu) diff --git a/openconnect-internal.h b/openconnect-internal.h index 5a6d6094..10cc909a 100644 --- a/openconnect-internal.h +++ b/openconnect-internal.h @@ -566,10 +566,11 @@ struct openconnect_info { char *ifname; char *cmd_ifname; - int reqmtu, basemtu; + int reqmtu, basemtu; /* Local static configured values */ const char *banner; struct oc_ip_info ip_info; + int cstp_basemtu; /* Returned by server */ #ifdef _WIN32 long dtls_monitored, ssl_monitored, cmd_monitored, tun_monitored;