[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state
From: |
Simon Goldschmidt |
Subject: |
[lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state |
Date: |
Fri, 23 Oct 2009 13:46:40 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 |
Follow-up Comment #14, bug #26251 (project lwip):
A relatively complete implementation of RFC 1337 vs. RFC 793 (chapter 3.9
Event Processing - Segment Arrives) is below. This is relatively complete (the
'acceptable' check is not fully made - only for SYN - but I guess it's OK like
that), but the code is also biger than before:
/* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable'
segments */
/* RFC 793 3.9 Event Processing - Segment Arrives:
* - first check sequence number - we skip that one in TIME_WAIT (always
* acceptable since we only send ACKs)
* - second check the RST bit (... return) */
if (flags & TCP_RST) {
return ERR_OK;
}
/* - fourth, check the SYN bit, */
if (flags & TCP_SYN) {
/* If an incoming segment is not acceptable, an acknowledgment
should be sent in reply */
if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt+pcb->rcv_wnd)) {
/* If the SYN is in the window it is an error, send a reset */
/* @todo: send RST */
tcp_rst(ackno, seqno + tcplen, &(iphdr->dest), &(iphdr->src),
tcphdr->dest, tcphdr->src);
return ERR_OK;
}
} else if (flags & TCP_FIN) {
/* - eighth, check the FIN bit: Remain in the TIME-WAIT state.
Restart the 2 MSL time-wait timeout.*/
pcb->tmr = tcp_ticks;
}
if ((tcplen > 0)) {
/* Acknowledge data, FIN or out-of-window SYN */
pcb->flags |= TF_ACK_NOW;
return tcp_output(pcb);
}
return ERR_OK;
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?26251>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, (continued)
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Simon Goldschmidt, 2009/10/19
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Oleg Tyshev, 2009/10/19
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Simon Goldschmidt, 2009/10/21
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Kieran Mansley, 2009/10/22
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Simon Goldschmidt, 2009/10/22
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Oleg Tyshev, 2009/10/22
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Simon Goldschmidt, 2009/10/22
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Oleg Tyshev, 2009/10/22
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Simon Goldschmidt, 2009/10/23
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Oleg Tyshev, 2009/10/23
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state,
Simon Goldschmidt <=
- [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state, Simon Goldschmidt, 2009/10/25