]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
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 dacb2ae2de1b3a41eb70a2ba1b212d03081c4606..d57d7418e5c015c84a2b5acf4bc7bdd4a4771da9 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)