From ebd167b6584ade6ec0ff09e827b0974b81d17f13 Mon Sep 17 00:00:00 2001 From: fbernon Date: Tue, 9 Oct 2007 20:48:28 +0000 Subject: [PATCH] Add sanity checking on TCP_MAXRTX and TCP_SYNMAXRTX --- src/core/init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/init.c b/src/core/init.c index d7bc0d44..d121f133 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -94,7 +94,10 @@ #error "If you want to use TCP, TCP_WND must fit in an u16_t, so, you have to reduce it in your lwipopts.h" #endif #if (LWIP_TCP && (TCP_SND_QUEUELEN > 0xffff)) - #error If you want to use TCP, TCP_SND_QUEUELEN must fit in an u16_t", so, you have to reduce it in your lwipopts.h" + #error If you want to use TCP, TCP_SND_QUEUELEN must fit in an u16_t, so, you have to reduce it in your lwipopts.h" +#endif +#if (LWIP_TCP && ((TCP_MAXRTX > 12) || (TCP_SYNMAXRTX > 12))) + #error If you want to use TCP, TCP_MAXRTX and TCP_SYNMAXRTX must less or equal to 12 (due to tcp_backoff table), so, you have to reduce them in your lwipopts.h" #endif #if (LWIP_IGMP && (MEMP_NUM_IGMP_GROUP<=1)) #error "If you want to use IGMP, you have to define MEMP_NUM_IGMP_GROUP>1 in your lwipopts.h"