Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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: Nikos Mavrogiannopoulos <nmav@redhat.com>
  • Loading branch information
Nikos Mavrogiannopoulos authored and David Woodhouse committed Jul 4, 2016
1 parent 7a4140a commit 90e1555
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cstp.c
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions openconnect-internal.h
Expand Up @@ -116,6 +116,7 @@
#define SHA1_SIZE 20
#define MD5_SIZE 16

#define MAX(x,y) ((x)>(y))?(x):(y)
/****************************************************************************/

struct pkt {
Expand Down

0 comments on commit 90e1555

Please sign in to comment.