From 8343c750240520d6eb381e688069d39b289cb144 Mon Sep 17 00:00:00 2001 From: Songpeng Li Date: Thu, 16 Aug 2018 08:58:04 +0800 Subject: [PATCH] NetworkPkg: TcpDxe: Remove the redundant code. The function TcpPawsOK that is never called have been removed. Cc: Jiaxin Wu Cc: Siyuan Fu Cc: Laszlo Ersek Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1064 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Songpeng Li Reviewed-by: Laszlo Ersek Reviewed-by: Jiaxin Wu --- NetworkPkg/TcpDxe/TcpOption.c | 32 +------------------------------- NetworkPkg/TcpDxe/TcpOption.h | 18 +----------------- 2 files changed, 2 insertions(+), 48 deletions(-) diff --git a/NetworkPkg/TcpDxe/TcpOption.c b/NetworkPkg/TcpDxe/TcpOption.c index bacce1070d..bd1c2b9c27 100644 --- a/NetworkPkg/TcpDxe/TcpOption.c +++ b/NetworkPkg/TcpDxe/TcpOption.c @@ -1,7 +1,7 @@ /** @file Routines to process TCP option. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -342,33 +342,3 @@ TcpParseOption ( return 0; } - -/** - Check the segment against PAWS. - - @param[in] Tcb Pointer to the TCP_CB of this TCP instance. - @param[in] TSVal The timestamp value. - - @retval 1 The segment passed the PAWS check. - @retval 0 The segment failed to pass the PAWS check. - -**/ -UINT32 -TcpPawsOK ( - IN TCP_CB *Tcb, - IN UINT32 TSVal - ) -{ - // - // PAWS as defined in RFC1323, buggy... - // - if (TCP_TIME_LT (TSVal, Tcb->TsRecent) && - TCP_TIME_LT (Tcb->TsRecentAge + TCP_PAWS_24DAY, mTcpTick) - ) { - - return 0; - - } - - return 1; -} diff --git a/NetworkPkg/TcpDxe/TcpOption.h b/NetworkPkg/TcpDxe/TcpOption.h index 0ccadb9536..e50fb9b129 100644 --- a/NetworkPkg/TcpDxe/TcpOption.h +++ b/NetworkPkg/TcpDxe/TcpOption.h @@ -1,7 +1,7 @@ /** @file Tcp option's routine header file. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -126,20 +126,4 @@ TcpParseOption ( IN OUT TCP_OPTION *Option ); -/** - Check the segment against PAWS. - - @param[in] Tcb Pointer to the TCP_CB of this TCP instance. - @param[in] TSVal The timestamp value. - - @retval 1 The segment passed the PAWS check. - @retval 0 The segment failed to pass the PAWS check. - -**/ -UINT32 -TcpPawsOK ( - IN TCP_CB *Tcb, - IN UINT32 TSVal - ); - #endif