Produce an error if the UIP_TCP_MSS is too large for UIP_BUFSIZE
This commit is contained in:
parent
61a8fa9977
commit
ea4bc3816f
1 changed files with 4 additions and 1 deletions
|
@ -382,6 +382,9 @@
|
|||
* UIP_BUFSIZE - UIP_LLH_LEN - UIP_TCPIP_HLEN.
|
||||
*/
|
||||
#ifdef 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)
|
||||
|
|
Loading…
Add table
Reference in a new issue