mirror of
https://github.com/ipxe/ipxe
synced 2026-01-21 01:28:02 +03:00
[tcp] Discard packets that lie immediately before the receive window
We will currently enqueue (rather than discard) retransmitted packets that lie immediately before the current receive window. These packets will be harmlessly discarded when the receive queue is processed immediately afterwards, but cause confusion when attempting to debug TCP performance issues. Fix by adjusting the comparison so that packets that lie immediately before the receive window will be discarded immediately and never enqueued. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -1317,7 +1317,7 @@ static void tcp_rx_enqueue ( struct tcp_connection *tcp, uint32_t seq,
|
||||
*/
|
||||
if ( ( ! ( tcp->tcp_state & TCP_STATE_RCVD ( TCP_SYN ) ) ) ||
|
||||
( tcp_cmp ( seq, tcp->rcv_ack + tcp->rcv_win ) >= 0 ) ||
|
||||
( tcp_cmp ( nxt, tcp->rcv_ack ) < 0 ) ||
|
||||
( tcp_cmp ( nxt, tcp->rcv_ack ) <= 0 ) ||
|
||||
( seq_len == 0 ) ) {
|
||||
free_iob ( iobuf );
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user