From b9ebcd7738bccc04bacd35f8e9efaf88d4bbfd0f Mon Sep 17 00:00:00 2001 From: likewise Date: Tue, 17 Aug 2004 09:32:31 +0000 Subject: [PATCH] Ingress TCP keep-alive with garbage byte support. --- src/core/tcp_in.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index f897f01b..357825ec 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -1162,6 +1162,11 @@ tcp_receive(struct tcp_pcb *pcb) #endif /* TCP_QUEUE_OOSEQ */ } + } else { + if (TCP_SEQ_GT(pcb->rcv_nxt, seqno) || + TCP_SEQ_GEQ(seqno, pcb->rcv_nxt + pcb->rcv_wnd)) { + tcp_ack_now(pcb); + } } } else { /* Segments with length 0 is taken care of here. Segments that @@ -1201,7 +1206,7 @@ tcp_parseopt(struct tcp_pcb *pcb) ++c; /* NOP option. */ } else if (opt == 0x02 && - opts[c + 1] == 0x04) { + opts[c + 1] == 0x04) { /* An MSS option with the right option length. */ mss = (opts[c + 2] << 8) | opts[c + 3]; pcb->mss = mss > TCP_MSS? TCP_MSS: mss;