summaryrefslogtreecommitdiff
path: root/NetworkPkg
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2016-07-08 11:59:13 +0800
committerFu Siyuan <siyuan.fu@intel.com>2016-07-18 10:08:35 +0800
commit09c25d1f6cea196a0c6c4128e839a3402f60308c (patch)
tree4951ce141c267d090f34b992db7420dca039dc73 /NetworkPkg
parentc9da41b235eaf34248c92839924650f071079dc8 (diff)
downloadedk2-platforms-09c25d1f6cea196a0c6c4128e839a3402f60308c.tar.xz
NetworkPkg: 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>
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/TcpDxe/TcpInput.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/NetworkPkg/TcpDxe/TcpInput.c b/NetworkPkg/TcpDxe/TcpInput.c
index 745ee4cc6e..28bb021d7e 100644
--- a/NetworkPkg/TcpDxe/TcpInput.c
+++ b/NetworkPkg/TcpDxe/TcpInput.c
@@ -31,7 +31,7 @@ TcpSeqAcceptable (
IN TCP_SEG *Seg
)
{
- return (TCP_SEQ_LEQ (Tcb->RcvWl2, Seg->End) &&
+ return (TCP_SEQ_LEQ (Tcb->RcvNxt, Seg->End) &&
TCP_SEQ_LT (Seg->Seq, Tcb->RcvWl2 + Tcb->RcvWnd));
}