summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2015-04-13 01:39:29 +0000
committersfu5 <sfu5@Edk2>2015-04-13 01:39:29 +0000
commit185395a4a21dcb11bd59db256077a3b29d92ff55 (patch)
tree8f846b0a5f8d92515d3266df49b05731df21a4ff /MdeModulePkg
parent494820d8c8348d9b3d93b8cc18fb813633c434f7 (diff)
downloadedk2-185395a4a21dcb11bd59db256077a3b29d92ff55.tar.gz
edk2-185395a4a21dcb11bd59db256077a3b29d92ff55.tar.bz2
edk2-185395a4a21dcb11bd59db256077a3b29d92ff55.zip
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 <balaton@eik.bme.hu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17165 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
index 3702bead50..95f47f91bc 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
@@ -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 @@ TcpInitTcbPeer (
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