Produce an error if the UIP_TCP_MSS is too large for UIP_BUFSIZE
This commit is contained in:
parent
61a8fa9977
commit
ea4bc3816f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user