Impose minimum MTU of 1280 bytes.
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 4 Feb 2013 16:01:51 +0000 (16:01 +0000)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 4 Feb 2013 16:01:51 +0000 (16:01 +0000)
Some people have seen extremely low pMTU values from the kernel. Not sure
why, but let's impose a lower limit for now.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
cstp.c

diff --git a/cstp.c b/cstp.c
index dacb2ae..d57d741 100644 (file)
--- a/cstp.c
+++ b/cstp.c
@@ -144,6 +144,8 @@ static void calculate_mtu(struct openconnect_info *vpninfo, int *base_mtu, int *
                /* Default */
                *mtu = 1406;
        }
+       if (*mtu < 1280)
+               *mtu = 1280;
 }
 
 static int start_cstp_connection(struct openconnect_info *vpninfo)