]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
Added additional sanity check that all headers (without IP- or TCP options) fit into...
authorSimon Goldschmidt <goldsimon@gmx.de>
Mon, 14 Jan 2013 17:05:18 +0000 (18:05 +0100)
committerSimon Goldschmidt <goldsimon@gmx.de>
Mon, 14 Jan 2013 17:05:18 +0000 (18:05 +0100)
src/core/init.c

index 65c3f06f45b301264c01a02aaf520e46482e09d1..c24c0274e1dffcf22fae7e0347aeff8810e3bf8d 100644 (file)
 #if TCP_SNDQUEUELOWAT >= TCP_SND_QUEUELEN
   #error "lwip_sanity_check: WARNING: TCP_SNDQUEUELOWAT must be less than TCP_SND_QUEUELEN. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
 #endif
+#if !MEMP_MEM_MALLOC && (PBUF_POOL_BUFSIZE <= (PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN))
+  #error "lwip_sanity_check: WARNING: PBUF_POOL_BUFSIZE does not provide enough space for protocol headers. If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
+#endif
 #if !MEMP_MEM_MALLOC && (TCP_WND > (PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - (PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN))))
   #error "lwip_sanity_check: WARNING: TCP_WND is larger than space provided by PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - protocol headers). If you know what you are doing, define LWIP_DISABLE_TCP_SANITY_CHECKS to 1 to disable this error."
 #endif