/** @file\r
Misc support routines for TCP driver.\r
\r
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_SND_TS);\r
TCP_SET_FLG (Tcb->CtrlFlag, TCP_CTRL_RCVD_TS);\r
\r
+ Tcb->TsRecent = Opt->TSVal;\r
+\r
//\r
// Compute the effective SndMss per RFC1122\r
// section 4.2.2.6. If timestamp option is\r
LIST_ENTRY *Entry;\r
LIST_ENTRY *Head;\r
TCP_CB *Node;\r
- TCP_PROTO_DATA *TcpProto;\r
\r
ASSERT (\r
(Tcb != NULL) &&\r
\r
InsertHeadList (Head, &Tcb->List);\r
\r
- TcpProto = (TCP_PROTO_DATA *) Tcb->Sk->ProtoReserved;\r
\r
return 0;\r
}\r
} else {\r
Ip6 = TcpProto->TcpService->IpIo->Ip.Ip6;\r
ASSERT (Ip6 != NULL);\r
- Ip6->GetModeData (Ip6, &Ip6Mode, NULL, NULL);\r
+ if (!EFI_ERROR (Ip6->GetModeData (Ip6, &Ip6Mode, NULL, NULL))) {\r
+ if (Ip6Mode.AddressList != NULL) {\r
+ FreePool (Ip6Mode.AddressList);\r
+ }\r
+\r
+ if (Ip6Mode.GroupTable != NULL) {\r
+ FreePool (Ip6Mode.GroupTable);\r
+ }\r
+\r
+ if (Ip6Mode.RouteTable != NULL) {\r
+ FreePool (Ip6Mode.RouteTable);\r
+ }\r
+\r
+ if (Ip6Mode.NeighborCache != NULL) {\r
+ FreePool (Ip6Mode.NeighborCache);\r
+ }\r
+\r
+ if (Ip6Mode.PrefixTable != NULL) {\r
+ FreePool (Ip6Mode.PrefixTable);\r
+ }\r
+\r
+ if (Ip6Mode.IcmpTypeList != NULL) {\r
+ FreePool (Ip6Mode.IcmpTypeList);\r
+ }\r
+ }\r
\r
return (UINT16) (Ip6Mode.MaxPacketSize - sizeof (TCP_HEAD));\r
}\r