From f1b82e0e9a37bc04fbaeb267e3599872f103568b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 21 Oct 2009 15:15:34 +0000 Subject: [PATCH] bug #27315: zero window probe and FIN: only send pure FIN if the enqueued FIN segment doesn't contain any other data --- src/core/tcp_out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);