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]> --- MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c | 2 ++ NetworkPkg/TcpDxe/TcpMisc.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c index 3702bea..5d27c27 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c @@ -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 diff --git a/NetworkPkg/TcpDxe/TcpMisc.c b/NetworkPkg/TcpDxe/TcpMisc.c index 0a4eda3..94b03f4 100644 --- a/NetworkPkg/TcpDxe/TcpMisc.c +++ b/NetworkPkg/TcpDxe/TcpMisc.c @@ -161,6 +161,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 -- 1.8.1.5 ------------------------------------------------------------------------------ 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-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
