mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
set tun device MTU based on minimum MTU of DTLS and TLS.
This commit is contained in:
@@ -830,10 +830,14 @@ unsigned mtu_overhead, dtls_mtu = 0, tls_mtu = 0;
|
||||
}
|
||||
dtls_mtu = MIN(sizeof(buffer)-1, dtls_mtu);
|
||||
|
||||
|
||||
tls_printf(ws->session, "X-DTLS-MTU: %u\r\n", dtls_mtu);
|
||||
}
|
||||
|
||||
if (dtls_mtu == 0)
|
||||
set_tun_mtu(ws, tls_mtu);
|
||||
else
|
||||
set_tun_mtu(ws, MIN(dtls_mtu, tls_mtu));
|
||||
|
||||
ret = tls_puts(ws->session, "X-CSTP-Banner: Welcome\r\n");
|
||||
SEND_ERR(ret);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user