Fixed bug in handling of SYN_SENT, where it would move to established on an ACK or a SYN, rather than an ACK *and* a SYN.

This commit is contained in:
kieranm 2004-01-13 12:10:10 +00:00
parent 48fb31fe75
commit 58761b590f

View File

@ -540,8 +540,8 @@ tcp_process(struct tcp_pcb *pcb)
case SYN_SENT:
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %lu pcb->snd_nxt %lu unacked %lu\n", ackno,
pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno)));
if (flags & (TCP_ACK | TCP_SYN) &&
ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) {
if ((flags & TCP_ACK) && (flags & TCP_SYN)
&& ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) {
pcb->rcv_nxt = seqno + 1;
pcb->lastack = ackno;
pcb->snd_wnd = tcphdr->wnd;