[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #20779] Keep-Alive and SYNs
From: |
Oleg Tyshev |
Subject: |
[lwip-devel] [bug #20779] Keep-Alive and SYNs |
Date: |
Mon, 10 Sep 2007 13:24:20 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 |
Follow-up Comment #10, bug #20779 (project lwip):
I think, that in tcp_process() should be added SYN check for any state.
tcp_receive() is corect now only if sequence number of the packet outside of
the receive window. Otherwise it could be queued into out of sequence queue or
processed as data (by us tcplen = p->tot_len + ((flags & TCP_FIN || flags &
TCP_SYN)? 1: 0);)
for example instead
case CLOSE_WAIT:
/* FALLTHROUGH */
case ESTABLISHED:
accepted_inseq = tcp_receive(pcb);
if ((flags & TCP_FIN) && accepted_inseq) { /* passive close */
tcp_ack_now(pcb);
pcb->state = CLOSE_WAIT;
}
break;
would be more correct following code
case CLOSE_WAIT:
/* FALLTHROUGH */
case ESTABLISHED:
if (flags & TCP_SYN) {
tcp_ack_now(pcb);
}
else {
accepted_inseq = tcp_receive(pcb);
if ((flags & TCP_FIN) && accepted_inseq) { /* passive close */
tcp_ack_now(pcb);
pcb->state = CLOSE_WAIT;
}
}
break;
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?20779>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #20779] Keep-Alive and SYNs,
Oleg Tyshev <=