From 43fd5c28b56affe4c7141158ff481b3574590f85 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 26 Nov 2009 16:42:13 +0000 Subject: [PATCH] Fixed bug #28098: Nagle can prevent fast retransmit from sending segment by basing the nagle-decision on TF_INFR also --- CHANGELOG | 4 ++++ src/include/lwip/tcp.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 19c5ae82..d21c1f26 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -46,6 +46,10 @@ HISTORY ++ Bugfixes: + 2009-11-26: Simon Goldschmidt + * tcp.h: Fixed bug #28098: Nagle can prevent fast retransmit from sending + segment + 2009-11-26: Simon Goldschmidt * tcp.h, sockets.c: Fixed bug #28099: API required to disable Nagle algorithm at PCB level diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index cdc79cec..2a2e7b2c 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -138,9 +138,10 @@ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb); * - the TF_NODELAY flag is set (nagle algorithm turned off for this pcb) or * - the only unsent segment is at least pcb->mss bytes long (or there is more * than one unsent segment - with lwIP, this can happen although unsent->len < mss) + * - or if we are in fast-retransmit (TF_INFR) */ #define tcp_do_output_nagle(tpcb) ((((tpcb)->unacked == NULL) || \ - ((tpcb)->flags & TF_NODELAY) || \ + ((tpcb)->flags & (TF_NODELAY | TF_INFR)) || \ (((tpcb)->unsent != NULL) && (((tpcb)->unsent->next != NULL) || \ ((tpcb)->unsent->len >= (tpcb)->mss))) \ ) ? 1 : 0)