diff --git a/libports/include/lwip/lwipopts.h b/libports/include/lwip/lwipopts.h index 6ef45266af..c710c70503 100644 --- a/libports/include/lwip/lwipopts.h +++ b/libports/include/lwip/lwipopts.h @@ -51,7 +51,7 @@ #define TCP_MSS 1460 #define TCP_WND (32 * TCP_MSS) -#define TCP_SND_BUF (128 * TCP_MSS) +#define TCP_SND_BUF (128 * TCP_MSS > 65535 ? 65535 : 128 * TCP_MSS) #define TCP_SND_QUEUELEN ((32 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) #define RECV_BUFSIZE_DEFAULT 2147483647 /* this is actually INT_MAX, default value */