Commit 45228374 authored by David Woodhouse's avatar David Woodhouse

Remember the X-CSTP-Base-MTU: value that the server sends back

We'll want this, for calculating DTLS MTU with PSK-NEGOTIATE.
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 16fc31a8
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment