diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 60d0f87b..7e1cb70b 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -948,7 +948,7 @@ tcp_zero_window_probe(struct tcp_pcb *pcb) if(seg == NULL) return; - is_fin = (TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0; + is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); len = is_fin ? TCP_HLEN : TCP_HLEN + 1; p = pbuf_alloc(PBUF_IP, len, PBUF_RAM);