From 533fc217d4812fdf6c53ee6fd825f09f20c5357f Mon Sep 17 00:00:00 2001 From: likewise Date: Fri, 4 Feb 2005 13:43:13 +0000 Subject: [PATCH] 4 February 2004, Leon Woestenberg tcp_in.c: Applied fix patch for bug #2679. tcp_out.c: Applied fix patch for bug #2679. http://savannah.nongnu.org/bugs/?func=detailitem&item_id=2679 --- src/core/tcp_in.c | 4 +++- src/core/tcp_out.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index c050a05a..eff719c6 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -758,7 +758,9 @@ tcp_receive(struct tcp_pcb *pcb) /* Update the send buffer space. */ pcb->acked = ackno - pcb->lastack; - pcb->snd_buf += pcb->acked; + + /* FIX: Data split over odd boundaries */ + pcb->snd_buf += ((pcb->acked+1) & ~0x1); /* Even the send buffer */ /* Reset the fast retransmit variables. */ pcb->dupacks = 0; diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 368032d3..de92fba1 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -337,7 +337,10 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len, ++len; } pcb->snd_lbb += len; - pcb->snd_buf -= len; + + /* FIX: Data split over odd boundaries */ + pcb->snd_buf -= ((len+1) & ~0x1); /* Even the send buffer */ + /* update number of segments on the queues */ pcb->snd_queuelen = queuelen; LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_enqueue: %d (after enqueued)\n", pcb->snd_queuelen));