diff --git a/CHANGELOG b/CHANGELOG index 8f771703..eefa9135 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -25,6 +25,10 @@ HISTORY ++ Bugfixes: + 2009-08-23 Simon Goldschmidt + * opt.h, init.c: bug #26649: TCP fails when TCP_MSS > TCP_SND_BUF + Fixed wrong parenthesis, added check in init.c + 2009-08-23 Simon Goldschmidt * ppp.c: bug #27266: wait-state debug message in pppMain occurs every ms diff --git a/src/core/init.c b/src/core/init.c index 277811a6..ff679738 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -208,6 +208,8 @@ lwip_sanity_check(void) #if LWIP_TCP if (MEMP_NUM_TCP_SEG < TCP_SND_QUEUELEN) LWIP_PLATFORM_DIAG(("lwip_sanity_check: WARNING: MEMP_NUM_TCP_SEG should be at least as big as TCP_SND_QUEUELEN\n")); + if (TCP_SND_BUF < 2 * TCP_MSS) + LWIP_PLATFORM_DIAG(("lwip_sanity_check: WARNING: TCP_SND_BUF must be at least as much as (2 * TCP_MSS) for things to work smoothly\n")); if (TCP_SND_QUEUELEN < (2 * (TCP_SND_BUF/TCP_MSS))) LWIP_PLATFORM_DIAG(("lwip_sanity_check: WARNING: TCP_SND_QUEUELEN must be at least as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work\n")); if (TCP_SNDLOWAT > TCP_SND_BUF) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index e8bd8b89..e389d4e3 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -803,7 +803,7 @@ * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */ #ifndef TCP_SND_QUEUELEN -#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF/TCP_MSS)) +#define TCP_SND_QUEUELEN (4 * (TCP_SND_BUF)/(TCP_MSS)) #endif /** @@ -812,7 +812,7 @@ * TCP snd_buf for select to return writable. */ #ifndef TCP_SNDLOWAT -#define TCP_SNDLOWAT (TCP_SND_BUF/2) +#define TCP_SNDLOWAT ((TCP_SND_BUF)/2) #endif /**