diff options
| author | Michael Brown | 2026-01-09 14:18:20 +0100 |
|---|---|---|
| committer | Michael Brown | 2026-01-09 14:18:20 +0100 |
| commit | 8e557f1ab0e0153cae43391f051947bf06629d2c (patch) | |
| tree | 601ec3ec2c93826e314227c6e7daec75da590c84 /src/net | |
| parent | [neighbour] Add the ability to artificially delay outbound packets (diff) | |
| download | ipxe-8e557f1ab0e0153cae43391f051947bf06629d2c.tar.gz ipxe-8e557f1ab0e0153cae43391f051947bf06629d2c.tar.xz ipxe-8e557f1ab0e0153cae43391f051947bf06629d2c.zip | |
[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>
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c index 2a98221f6..d47196ba5 100644 --- a/src/net/tcp.c +++ b/src/net/tcp.c @@ -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; |
