Fix the fix for LWIP_LOOPBACK_MAX_PBUFS :-)

This commit is contained in:
goldsimon 2017-06-26 08:21:53 +02:00
parent 5b15234833
commit 5efe26ebd3

View File

@ -960,7 +960,7 @@ netif_loop_output(struct netif *netif, struct pbuf *p)
clen = pbuf_clen(r);
/* check for overflow or too many pbuf on queue */
if (((netif->loop_cnt_current + clen) < netif->loop_cnt_current) ||
((netif->loop_cnt_current + clen) > LWIP_MAX(LWIP_LOOPBACK_MAX_PBUFS, 0xFFFF))) {
((netif->loop_cnt_current + clen) > LWIP_MIN(LWIP_LOOPBACK_MAX_PBUFS, 0xFFFF))) {
pbuf_free(r);
LINK_STATS_INC(link.memerr);
LINK_STATS_INC(link.drop);