david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src
Michael Brown f033694356 [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>
2010-07-15 19:59:57 +01:00
..
arch [romprefix] Do not check for BBS compatibility 2010-06-24 19:03:04 +01:00
bin Rename .cvsignore files to .gitignore 2007-06-09 22:57:00 +01:00
config [efi] Build iPXE script support into EFI binaries by default 2010-06-23 17:25:07 +01:00
core [hci] Continue processing while prompting for shell banner 2010-07-14 12:43:10 +01:00
crypto [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
doc [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
drivers [davicom] Use iPXE debugging infrastructure 2010-07-14 12:28:26 +01:00
hci [hci] Continue processing while prompting for shell banner 2010-07-14 12:43:10 +01:00
image [refcnt] Add ref_no_free handler 2010-06-23 00:34:48 +01:00
include [build] Mark weak functions noinline 2010-07-14 12:55:59 +01:00
interface [efi] Add the "snpnet" driver 2010-06-02 15:15:29 +01:00
libgcc [build] Mark __intel_new_proc_init with __libgcc rather than cdecl 2009-08-03 15:56:10 +01:00
net [tcp] Treat ACKs as sent only when successfully transmitted 2010-07-15 19:59:57 +01:00
tests [build] Rename gPXE to iPXE 2010-04-19 23:43:39 +01:00
usr [libc] Enable automated extraction of error usage reports 2010-05-31 03:11:57 +01:00
util [libc] Enable automated extraction of error usage reports 2010-05-31 03:11:57 +01:00
.gitignore [build] Add support for local configuration files 2010-03-26 19:07:22 +00:00
Makefile [build] Fix broken build caused by implied dependency upon "perl" 2010-06-24 17:25:54 +01:00
Makefile.housekeeping [build] Speed up rebuilding on header file changes 2010-07-14 18:47:35 +01:00
doxygen.cfg [build] Remove PACKED macro 2010-05-29 23:49:47 +01:00