summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c')
-rw-r--r--MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
index 41516a9ad8..3930539d77 100644
--- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
+++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c
@@ -426,6 +426,7 @@ TcpCloneTcb (
{
TCP_CB *Clone;
TCP4_SERVICE_DATA *TcpService;
+ EFI_IP4_PROTOCOL *Ip4;
Clone = NetAllocatePool (sizeof (TCP_CB));
@@ -454,10 +455,13 @@ TcpCloneTcb (
((TCP4_PROTO_DATA *) (Clone->Sk->ProtoReserved))->TcpPcb = Clone;
+ TcpService = ((TCP4_PROTO_DATA *) (Clone->Sk->ProtoReserved))->TcpService;
+
+ NetListInsertTail (&TcpService->SocketList, &Clone->Sk->Link);
+
//
// Open the device path on the handle where service binding resides on.
//
- TcpService = ((TCP4_PROTO_DATA *) (Clone->Sk->ProtoReserved))->TcpService;
gBS->OpenProtocol (
TcpService->ControllerHandle,
&gEfiDevicePathProtocolGuid,
@@ -467,6 +471,18 @@ TcpCloneTcb (
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
);
+ //
+ // Open the ip protocol by child controller.
+ //
+ gBS->OpenProtocol (
+ TcpService->IpIo->ChildHandle,
+ &gEfiIp4ProtocolGuid,
+ (VOID **) &Ip4,
+ TcpService->DriverBindingHandle,
+ Clone->Sk->SockHandle,
+ EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER
+ );
+
return Clone;
}