From bb87d19e847c1ffe318745e1fc42668fba0d6578 Mon Sep 17 00:00:00 2001 From: kieranm Date: Wed, 24 Nov 2004 17:05:41 +0000 Subject: [PATCH] Kieran Mansley - kjm25@cam.ac.uk - 24th Nov 2004 * Increase pcb->snd_buf by 1 when an ACK is received in SYN_SENT state to ensure correct operation --- src/core/tcp_in.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index b3b4c66f..c050a05a 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -503,7 +503,7 @@ tcp_process(struct tcp_pcb *pcb) /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { if (ackno == pcb->snd_nxt) { - acceptable = 1; + acceptable = 1; } } else { /*if (TCP_SEQ_GEQ(seqno, pcb->rcv_nxt) && @@ -540,6 +540,7 @@ tcp_process(struct tcp_pcb *pcb) pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno))); if ((flags & TCP_ACK) && (flags & TCP_SYN) && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { + pcb->snd_buf ++; pcb->rcv_nxt = seqno + 1; pcb->lastack = ackno; pcb->snd_wnd = tcphdr->wnd;