MdeModulePkg: Fix service binding issue in TCP4 and Ip4 dxe.
v2: Handle error case in SockCreateChild and fix typo issue when we destroy the socket Sock and its associated protocol control block, we need to first close the parent protocol, then remove the protocol from childHandle and last to free any data structures that allocated in CreateChild. But currently, we free the socket data (Socket ConfigureState) before removing the protocol form the childhandle. So if the up layer want to send the tcp reset packet in it's driver binding stop function, it will failed. The IpInstance destroy state is redundant and may cause ip transmit failed if up layer want to send ip packet. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Tcp request dispatcher implementation.
|
||||
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2017, 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
|
||||
@@ -332,16 +332,6 @@ Tcp4DetachPcb (
|
||||
ASSERT (Tcb != NULL);
|
||||
|
||||
Tcp4FlushPcb (Tcb);
|
||||
|
||||
//
|
||||
// Close the IP protocol.
|
||||
//
|
||||
gBS->CloseProtocol (
|
||||
Tcb->IpInfo->ChildHandle,
|
||||
&gEfiIp4ProtocolGuid,
|
||||
ProtoData->TcpService->IpIo->Image,
|
||||
Sk->SockHandle
|
||||
);
|
||||
|
||||
IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo);
|
||||
|
||||
|
Reference in New Issue
Block a user