]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c
The patch acknowledges the TCP zero window probe message, either the format with...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Input.c
index b29e6cb67202abfc70955bdcb93fbdd89f4c82c1..f8dcc365e30c4987fe7635d89a1ff7efb48b394f 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   TCP input process routines.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php<BR>\r
@@ -33,7 +33,7 @@ TcpSeqAcceptable (
   )\r
 {\r
   return (TCP_SEQ_LEQ (Tcb->RcvWl2, Seg->End) &&\r
-          TCP_SEQ_LEQ (Seg->Seq, Tcb->RcvWl2 + Tcb->RcvWnd));\r
+          TCP_SEQ_LT (Seg->Seq, Tcb->RcvWl2 + Tcb->RcvWnd));\r
 }\r
 \r
 \r
@@ -799,7 +799,7 @@ TcpInput (
       Tcb     = TcpCloneTcb (Parent);\r
       if (Tcb == NULL) {\r
         DEBUG ((EFI_D_ERROR, "TcpInput: discard a segment because"\r
-          "failed to clone a child for TCB%x\n", Tcb));\r
+          " failed to clone a child for TCB%x\n", Tcb));\r
 \r
         goto DISCARD;\r
       }\r
@@ -925,6 +925,14 @@ TcpInput (
   // Process segment in SYN_RCVD or TCP_CONNECTED states\r
   //\r
 \r
+  //\r
+  // Clear probe timer since the RecvWindow is opened.\r
+  //\r
+  if (Tcb->ProbeTimerOn && (Seg->Wnd != 0)) {\r
+    TcpClearTimer (Tcb, TCP_TIMER_PROBE);\r
+    Tcb->ProbeTimerOn = FALSE;\r
+  }\r
+\r
   //\r
   // First step: Check whether SEG.SEQ is acceptable\r
   //\r
@@ -1281,11 +1289,6 @@ StepSix:
   Tcb->Idle = 0;\r
   TcpSetKeepaliveTimer (Tcb);\r
 \r
-  if (TCP_TIMER_ON (Tcb->EnabledTimer, TCP_TIMER_PROBE)) {\r
-\r
-    TcpClearTimer (Tcb, TCP_TIMER_PROBE);\r
-  }\r
-\r
   if (TCP_FLG_ON (Seg->Flag, TCP_FLG_URG) &&\r
       !TCP_FIN_RCVD (Tcb->State)) {\r
 \r