Revision: 17165
          http://sourceforge.net/p/edk2/code/17165
Author:   sfu5
Date:     2015-04-13 01:39:29 +0000 (Mon, 13 Apr 2015)
Log Message:
-----------
Save initial TSVal from TCP connection initiation packets.

RFC1323 says the most recently received TSVal must be echoed in TSecr in ACK 
packets
which was not done at first connection because the code saving the TSVal from 
the peer
was skipped at this point. This resulted in sending an ACK reply with a 0 TSecr 
that
was rejected at least by FreeBSD. This patch fixes this by updating the saved 
TSVal
also for connection initiation packets.
Thanks to Laszlo Ersek for analysis and help in debugging.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: BALATON Zoltan <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
Reviewed-by: Ye Ting <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
    trunk/edk2/NetworkPkg/TcpDxe/TcpMisc.c

Modified: trunk/edk2/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c        
2015-04-10 22:08:57 UTC (rev 17164)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c        
2015-04-13 01:39:29 UTC (rev 17165)
@@ -1,7 +1,7 @@
 /** @file
   Misc support routines for tcp.
 
-Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
 This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD 
License
 which accompanies this distribution.  The full text of the license may be 
found at
@@ -157,6 +157,8 @@
     TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_SND_TS);
     TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_RCVD_TS);
 
+    Tcb->TsRecent = Opt->TSVal;
+
     //
     // Compute the effective SndMss per RFC1122
     // section 4.2.2.6. If timestamp option is

Modified: trunk/edk2/NetworkPkg/TcpDxe/TcpMisc.c
===================================================================
--- trunk/edk2/NetworkPkg/TcpDxe/TcpMisc.c      2015-04-10 22:08:57 UTC (rev 
17164)
+++ trunk/edk2/NetworkPkg/TcpDxe/TcpMisc.c      2015-04-13 01:39:29 UTC (rev 
17165)
@@ -2,7 +2,7 @@
   Misc support routines for TCP driver.
 
   (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
-  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -161,6 +161,8 @@
     TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_SND_TS);
     TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_RCVD_TS);
 
+    Tcb->TsRecent = Opt->TSVal;
+
     //
     // Compute the effective SndMss per RFC1122
     // section 4.2.2.6. If timestamp option is


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to