From 5efe26ebd3a6689ed3cfc01d889d0792e971a72b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 26 Jun 2017 08:21:53 +0200 Subject: [PATCH] Fix the fix for LWIP_LOOPBACK_MAX_PBUFS :-) --- src/core/netif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/netif.c b/src/core/netif.c index 8f5c5c21..e642a950 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -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);