[tcp] Update received sequence number before delivering received data
authorMichael Brown <mcb30@ipxe.org>
Fri, 21 May 2010 23:45:49 +0000 (00:45 +0100)
committerMarty Connor <mdc@etherboot.org>
Sun, 1 Aug 2010 19:19:49 +0000 (15:19 -0400)
commitea51761c6cdab3b501a942cf8ec3db115ae2ef5a
treea4058d7a851d2e332732c47d8793b004dd07c00d
parentb764464f04c5316e0f8188ef6bf3a74e8ebc1f00
[tcp] Update received sequence number before delivering received data

gPXE currently updates the TCP sequence number after delivering the
data to the application via xfer_deliver_iob().  If the application
responds to the received data by transmitting more data, this would
result in a stale ACK number appearing in the transmitted packet,
which potentially causes retransmissions and also gives the
undesirable appearance of violating causality (by sending a response
to a message that we claim not to have yet received).

Reported-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Marty Connor <mdc@etherboot.org>
src/net/tcp.c