]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Fix bug in TCP which not sending out ACK in certain circumstance.
authorFu Siyuan <siyuan.fu@intel.com>
Tue, 12 Jul 2016 01:47:58 +0000 (09:47 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Mon, 18 Jul 2016 02:08:43 +0000 (10:08 +0800)
commit977528bad7442f8f2ac1c1149f3f0386e478a73b
treed6a4b00ec043ae3845ca21b245eb2b7cd42729ad
parent09c25d1f6cea196a0c6c4128e839a3402f60308c
MdeModulePkg: Fix bug in TCP which not sending out ACK in certain circumstance.

Consider the situation as shown in below chart. The last ACK message has
acknowledged the Tcb->RcvWl2, and all the segments until Tcb->RcvNxt have
been received by TCP driver. The Tcb->RcvNxt is not acknowledged due to the
delayed ACK. In this case an incoming segment (Seg->Seq, Seg->End) should
not be accepted by TCP driver, and an immediate ACK is required.

Current TcpSeqAcceptable() thought it’s an acceptable segment incorrectly, it
continues the TcpInput() process instead of sending out an ACK and droping the
segment immediately.

Tcb->RcvWl2                       Tcb->RcvNxt        Tcb->RcvWl2 + Tcb->RcvWnd
        Seg->Seq       Seg->End         |                          |
    |     |               |             |                          |
 ---+-----+---------------+-------------+--------------------------+-----------
           <income segment>             <----Acceptable Range--- -->

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-By: Eugene Cohen <eugene@hp.com>
Reviewed-By: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-By: Ye Ting <ting.ye@intel.com>
MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c