summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMichael Brown2010-07-15 20:33:46 +0200
committerMichael Brown2010-07-15 20:59:57 +0200
commitf033694356117936fa733aad798a92fa09d0387c (patch)
treeb5c68766f277919299d66992796e00fe145a8e92 /contrib
parent[tcp] Merge boolean flags into a single "flags" field (diff)
downloadipxe-f033694356117936fa733aad798a92fa09d0387c.tar.gz
ipxe-f033694356117936fa733aad798a92fa09d0387c.tar.xz
ipxe-f033694356117936fa733aad798a92fa09d0387c.zip
[tcp] Treat ACKs as sent only when successfully transmitted
iPXE currently forces sending (i.e. sends a pure ACK even in the absence of fresh data to send) only in response to packets that consume sequence space or that lie outside of the receive window. This ignores the possibility that a previous ACK was not actually sent (due to, for example, the retransmission timer running). This does not cause incorrect behaviour, but does cause unnecessary retransmissions from our peer. For example: 1. Peer sends final data packet (ack 106 seq 521..523) 2. We send FIN (seq 106..107 ack 523) 3. Peer sends FIN (ack 106 seq 523..524) 4. We send nothing since retransmission timer is running for our FIN 5. Peer ACKs our FIN (ack 107 seq 524..524) 6. We send nothing since this packet consumes no sequence space 7. Peer retransmits FIN (ack 107 seq 523..524) 8. We ACK peer's FIN (seq 107..107 ack 524) What should happen at step (6) is that we should ACK the peer's FIN, since we can deduce that we have never sent this ACK. Fix by maintaining an "ACK pending" flag that is set whenever we are made aware that our peer needs an ACK (whether by consuming sequence space or by sending a packet that appears out of order), and is cleared only when the ACK packet has been transmitted. Reported-by: Piotr JaroszyƄski <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions