diff --git a/core/net/uipopt.h b/core/net/uipopt.h index ce871985f..d0d3219ad 100644 --- a/core/net/uipopt.h +++ b/core/net/uipopt.h @@ -382,7 +382,10 @@ * UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN. */ #ifdef UIP_CONF_TCP_MSS -#define UIP_TCP_MSS (UIP_CONF_TCP_MSS) +#if UIP_CONF_TCP_MSS < (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN) +#error UIP_CONF_TCP_MSS is too large for the current UIP_BUFSIZE +#endif /* UIP_CONF_TCP_MSS < (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN) */ +#define UIP_TCP_MSS (UIP_CONF_TCP_MSS) #else #define UIP_TCP_MSS (UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN) #endif