Commit 90e15554 authored by Nikos Mavrogiannopoulos's avatar Nikos Mavrogiannopoulos Committed by David Woodhouse

Fixed regression with CSTP MTU handling

That is, no longer enforce the MTU size for CSTP packets, since
a server may often ignore it and send oversized packets over TCP.
For that set 16KiB be the minimum size for CSTP MTU.
Signed-off-by: default avatarNikos Mavrogiannopoulos <nmav@redhat.com>
parent 7a4140a1
......@@ -826,7 +826,7 @@ int cstp_mainloop(struct openconnect_info *vpninfo, int *timeout)
and add POLLOUT. As it is, though, it'll just chew CPU time in that
fairly unlikely situation, until the write backlog clears. */
while (1) {
int len = vpninfo->deflate_pkt_size ? : vpninfo->ip_info.mtu;
int len = MAX(16384, vpninfo->deflate_pkt_size ? : vpninfo->ip_info.mtu);
int payload_len;
if (!vpninfo->cstp_pkt) {
......
......@@ -116,6 +116,7 @@
#define SHA1_SIZE 20
#define MD5_SIZE 16
#define MAX(x,y) ((x)>(y))?(x):(y)
/****************************************************************************/
struct pkt {
......
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