Skip to content

Commit

Permalink
NetworkPkg: TcpDxe: Remove the redundant code.
Browse files Browse the repository at this point in the history
The function TcpPawsOK that is never called have been removed.

Cc: Jiaxin Wu <[email protected]>
Cc: Siyuan Fu <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1064
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Songpeng Li <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Jiaxin Wu <[email protected]>
  • Loading branch information
Li-Aaron authored and jiaxinwu committed Aug 23, 2018
1 parent ad1e45d commit 8343c75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 48 deletions.
32 changes: 1 addition & 31 deletions NetworkPkg/TcpDxe/TcpOption.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file
Routines to process TCP option.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2018, 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
Expand Down Expand Up @@ -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;
}
18 changes: 1 addition & 17 deletions NetworkPkg/TcpDxe/TcpOption.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file
Tcp option's routine header file.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2018, 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
Expand Down Expand Up @@ -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

0 comments on commit 8343c75

Please sign in to comment.