From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4373381ED1 for ; Sat, 21 Jan 2017 18:41:07 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 21 Jan 2017 18:41:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,267,1477983600"; d="scan'208";a="56089195" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 21 Jan 2017 18:41:06 -0800 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 21 Jan 2017 18:41:06 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sat, 21 Jan 2017 18:41:06 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Sun, 22 Jan 2017 10:41:04 +0800 From: "Wu, Jiaxin" To: "Zhang, Lubo" , "edk2-devel@lists.01.org" CC: Sriram Subramanian , "Ye, Ting" , "Fu, Siyuan" Thread-Topic: [patch] NetworkPkg: Fix protocol handler service in HttpDxe. Thread-Index: AQHSdFCVanRdJld9C0ix9u7+g8rFHqFDyUdQ Date: Sun, 22 Jan 2017 02:41:04 +0000 Message-ID: <895558F6EA4E3B41AC93A00D163B7274162969C8@SHSMSX103.ccr.corp.intel.com> References: <1485049230-21348-1-git-send-email-lubo.zhang@intel.com> In-Reply-To: <1485049230-21348-1-git-send-email-lubo.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzY2ZWE4Y2ItZTI4Yy00OTk5LWIyNTUtM2UyOTIwZTE1Yjg1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkpcL3M1bGhJUGJXZDRHXC92RldnYjdxNDZLc3lvNStFZ3p2c3VVVTY1TWJ5dz0ifQ== x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch] NetworkPkg: Fix protocol handler service in HttpDxe. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2017 02:41:07 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Wu Jiaxin Thanks, Jiaxin > -----Original Message----- > From: Zhang, Lubo > Sent: Sunday, January 22, 2017 9:41 AM > To: edk2-devel@lists.01.org > Cc: Sriram Subramanian ; Ye, Ting ; > Fu, Siyuan ; Wu, Jiaxin > Subject: [patch] NetworkPkg: Fix protocol handler service in HttpDxe. >=20 > When we create a HTTP driver service binding private > instance, there may be different DriverBindingHandle > for Ipv4 or Ipv6, so it is essential to distinguish > the HttpService image which will be used in open > protocol or close protocol. >=20 > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Zhang Lubo > Cc: Sriram Subramanian > Cc: Ye Ting > Cc: Fu Siyuan > Cc: Wu Jiaxin > --- > NetworkPkg/HttpDxe/HttpDns.c | 18 ++++++++-------- > NetworkPkg/HttpDxe/HttpDriver.c | 21 +++++++++--------- > NetworkPkg/HttpDxe/HttpImpl.c | 11 ++++++++-- > NetworkPkg/HttpDxe/HttpProto.c | 48 ++++++++++++++++++++---------------= ---- > -- > NetworkPkg/HttpDxe/HttpProto.h | 5 +++-- > 5 files changed, 55 insertions(+), 48 deletions(-) >=20 > diff --git a/NetworkPkg/HttpDxe/HttpDns.c b/NetworkPkg/HttpDxe/HttpDns.c > index 0f5fe18..59cd7b3 100644 > --- a/NetworkPkg/HttpDxe/HttpDns.c > +++ b/NetworkPkg/HttpDxe/HttpDns.c > @@ -1,9 +1,9 @@ > /** @file > Routines for HttpDxe driver to perform DNS resolution based on UEFI DN= S > protocols. >=20 > -Copyright (c) 2015, Intel Corporation. All rights reserved.
> +Copyright (c) 2017, Intel Corporation. All rights reserved.
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BS= D > License > which accompanies this distribution. The full text of the license may b= e found > at > http://opensource.org/licenses/bsd-license.php >=20 > @@ -86,11 +86,11 @@ HttpDns4 ( > // > // Create a DNS child instance and get the protocol. > // > Status =3D NetLibCreateServiceChild ( > Service->ControllerHandle, > - Service->ImageHandle, > + Service->Ip4DriverBindingHandle, > &gEfiDns4ServiceBindingProtocolGuid, > &Dns4Handle > ); > if (EFI_ERROR (Status)) { > goto Exit; > @@ -98,11 +98,11 @@ HttpDns4 ( >=20 > Status =3D gBS->OpenProtocol ( > Dns4Handle, > &gEfiDns4ProtocolGuid, > (VOID **) &Dns4, > - Service->ImageHandle, > + Service->Ip4DriverBindingHandle, > Service->ControllerHandle, > EFI_OPEN_PROTOCOL_BY_DRIVER > ); > if (EFI_ERROR (Status)) { > goto Exit; > @@ -194,19 +194,19 @@ Exit: > Dns4->Configure (Dns4, NULL); >=20 > gBS->CloseProtocol ( > Dns4Handle, > &gEfiDns4ProtocolGuid, > - Service->ImageHandle, > + Service->Ip4DriverBindingHandle, > Service->ControllerHandle > ); > } >=20 > if (Dns4Handle !=3D NULL) { > NetLibDestroyServiceChild ( > Service->ControllerHandle, > - Service->ImageHandle, > + Service->Ip4DriverBindingHandle, > &gEfiDns4ServiceBindingProtocolGuid, > Dns4Handle > ); > } >=20 > @@ -288,11 +288,11 @@ HttpDns6 ( > // > // Create a DNSv6 child instance and get the protocol. > // > Status =3D NetLibCreateServiceChild ( > Service->ControllerHandle, > - Service->ImageHandle, > + Service->Ip6DriverBindingHandle, > &gEfiDns6ServiceBindingProtocolGuid, > &Dns6Handle > ); > if (EFI_ERROR (Status)) { > goto Exit; > @@ -300,11 +300,11 @@ HttpDns6 ( >=20 > Status =3D gBS->OpenProtocol ( > Dns6Handle, > &gEfiDns6ProtocolGuid, > (VOID **) &Dns6, > - Service->ImageHandle, > + Service->Ip6DriverBindingHandle, > Service->ControllerHandle, > EFI_OPEN_PROTOCOL_BY_DRIVER > ); > if (EFI_ERROR (Status)) { > goto Exit; > @@ -391,19 +391,19 @@ Exit: > Dns6->Configure (Dns6, NULL); >=20 > gBS->CloseProtocol ( > Dns6Handle, > &gEfiDns6ProtocolGuid, > - Service->ImageHandle, > + Service->Ip6DriverBindingHandle, > Service->ControllerHandle > ); > } >=20 > if (Dns6Handle !=3D NULL) { > NetLibDestroyServiceChild ( > Service->ControllerHandle, > - Service->ImageHandle, > + Service->Ip6DriverBindingHandle, > &gEfiDns6ServiceBindingProtocolGuid, > Dns6Handle > ); > } >=20 > diff --git a/NetworkPkg/HttpDxe/HttpDriver.c > b/NetworkPkg/HttpDxe/HttpDriver.c > index de27635..5727526 100644 > --- a/NetworkPkg/HttpDxe/HttpDriver.c > +++ b/NetworkPkg/HttpDxe/HttpDriver.c > @@ -1,9 +1,9 @@ > /** @file > The driver binding and service binding protocol for HttpDxe driver. >=20 > - Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
> (C) Copyright 2016 Hewlett Packard Enterprise Development LP
>=20 > 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 > @@ -43,21 +43,19 @@ EFI_DRIVER_BINDING_PROTOCOL > gHttpDxeIp6DriverBinding =3D { > /** > Create a HTTP driver service binding private instance. >=20 > @param[in] Controller The controller that has TCP4 service bi= nding > installed. > - @param[in] ImageHandle The HTTP driver's image handle. > @param[out] ServiceData Point to HTTP driver private instance. >=20 > @retval EFI_OUT_OF_RESOURCES Failed to allocate some resources. > @retval EFI_SUCCESS A new HTTP driver private instance is c= reated. >=20 > **/ > EFI_STATUS > HttpCreateService ( > IN EFI_HANDLE Controller, > - IN EFI_HANDLE ImageHandle, > OUT HTTP_SERVICE **ServiceData > ) > { > HTTP_SERVICE *HttpService; >=20 > @@ -70,11 +68,10 @@ HttpCreateService ( > } >=20 > HttpService->Signature =3D HTTP_SERVICE_SIGNATURE; > HttpService->ServiceBinding.CreateChild =3D HttpServiceBindingCreateCh= ild; > HttpService->ServiceBinding.DestroyChild =3D HttpServiceBindingDestroy= Child; > - HttpService->ImageHandle =3D ImageHandle; > HttpService->ControllerHandle =3D Controller; > HttpService->ChildrenNumber =3D 0; > InitializeListHead (&HttpService->ChildrenList); >=20 > *ServiceData =3D HttpService; > @@ -102,17 +99,17 @@ HttpCleanService ( > if (!UsingIpv6) { > if (HttpService->Tcp4ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpService->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > - HttpService->ImageHandle, > + HttpService->Ip4DriverBindingHandle, > HttpService->ControllerHandle > ); >=20 > NetLibDestroyServiceChild ( > HttpService->ControllerHandle, > - HttpService->ImageHandle, > + HttpService->Ip4DriverBindingHandle, > &gEfiTcp4ServiceBindingProtocolGuid, > HttpService->Tcp4ChildHandle > ); >=20 > HttpService->Tcp4ChildHandle =3D NULL; > @@ -120,17 +117,17 @@ HttpCleanService ( > } else { > if (HttpService->Tcp6ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpService->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > - HttpService->ImageHandle, > + HttpService->Ip6DriverBindingHandle, > HttpService->ControllerHandle > ); >=20 > NetLibDestroyServiceChild ( > HttpService->ControllerHandle, > - HttpService->ImageHandle, > + HttpService->Ip6DriverBindingHandle, > &gEfiTcp6ServiceBindingProtocolGuid, > HttpService->Tcp6ChildHandle > ); >=20 > HttpService->Tcp6ChildHandle =3D NULL; > @@ -380,11 +377,11 @@ HttpDxeStart ( > ); >=20 > if (!EFI_ERROR (Status)) { > HttpService =3D HTTP_SERVICE_FROM_PROTOCOL (ServiceBinding); > } else { > - Status =3D HttpCreateService (ControllerHandle, This->DriverBindingH= andle, > &HttpService); > + Status =3D HttpCreateService (ControllerHandle, &HttpService); > if (EFI_ERROR (Status)) { > return Status; > } >=20 > ASSERT (HttpService !=3D NULL); > @@ -403,11 +400,12 @@ HttpDxeStart ( > goto ON_ERROR; > } > } >=20 > if (IpVersion =3D=3D IP_VERSION_4) { > - > + HttpService->Ip4DriverBindingHandle =3D This->DriverBindingHandle; > + > if (HttpService->Tcp4ChildHandle =3D=3D NULL) { > // > // Create a TCP4 child instance, but do not configure it. This wil= l establish > the parent-child relationship. > // > Status =3D NetLibCreateServiceChild ( > @@ -438,11 +436,12 @@ HttpDxeStart ( > return EFI_ALREADY_STARTED; > } >=20 > } else { > UsingIpv6 =3D TRUE; > - > + HttpService->Ip6DriverBindingHandle =3D This->DriverBindingHandle; > + > if (HttpService->Tcp6ChildHandle =3D=3D NULL) { > // > // Create a TCP6 child instance, but do not configure it. This wil= l establish > the parent-child relationship. > // > Status =3D NetLibCreateServiceChild ( > diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.= c > index d19f733..bd8e0c0 100644 > --- a/NetworkPkg/HttpDxe/HttpImpl.c > +++ b/NetworkPkg/HttpDxe/HttpImpl.c > @@ -1,9 +1,9 @@ > /** @file > Implementation of EFI_HTTP_PROTOCOL protocol interfaces. >=20 > - Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
> + Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
> (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
>=20 > 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 > @@ -247,10 +247,11 @@ EfiHttpRequest ( > UINTN UrlLen; > CHAR16 *HostNameStr; > HTTP_TOKEN_WRAP *Wrap; > CHAR8 *FileUrl; > UINTN RequestMsgSize; > + EFI_HANDLE ImageHandle; >=20 > // > // Initializations > // > Url =3D NULL; > @@ -359,12 +360,18 @@ EfiHttpRequest ( > // > if (HttpInstance->UseHttps && HttpInstance->TlsChildHandle =3D=3D NU= LL) { > // > // Use TlsSb to create Tls child and open the TLS protocol. > // > + if (HttpInstance->LocalAddressIsIPv6) { > + ImageHandle =3D HttpInstance->Service->Ip6DriverBindingHandle; > + } else { > + ImageHandle =3D HttpInstance->Service->Ip4DriverBindingHandle; > + } > + > HttpInstance->TlsChildHandle =3D TlsCreateChild ( > - HttpInstance->Service->ImageHandl= e, > + ImageHandle, > &(HttpInstance->Tls), > &(HttpInstance->TlsConfiguration) > ); > if (HttpInstance->TlsChildHandle =3D=3D NULL) { > return EFI_DEVICE_ERROR; > diff --git a/NetworkPkg/HttpDxe/HttpProto.c > b/NetworkPkg/HttpDxe/HttpProto.c > index 2e8c42e..3d61ba2 100644 > --- a/NetworkPkg/HttpDxe/HttpProto.c > +++ b/NetworkPkg/HttpDxe/HttpProto.c > @@ -640,11 +640,11 @@ HttpInitProtocol ( > // > // Create TCP4 child. > // > Status =3D NetLibCreateServiceChild ( > HttpInstance->Service->ControllerHandle, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > &gEfiTcp4ServiceBindingProtocolGuid, > &HttpInstance->Tcp4ChildHandle > ); >=20 > if (EFI_ERROR (Status)) { > @@ -653,11 +653,11 @@ HttpInitProtocol ( >=20 > Status =3D gBS->OpenProtocol ( > HttpInstance->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > (VOID **) &Interface, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Service->ControllerHandle, > EFI_OPEN_PROTOCOL_BY_DRIVER > ); >=20 > if (EFI_ERROR (Status)) { > @@ -666,11 +666,11 @@ HttpInitProtocol ( >=20 > Status =3D gBS->OpenProtocol ( > HttpInstance->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > (VOID **) &HttpInstance->Tcp4, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Handle, > EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER > ); > if (EFI_ERROR(Status)) { > goto ON_ERROR; > @@ -678,11 +678,11 @@ HttpInitProtocol ( >=20 > Status =3D gBS->OpenProtocol ( > HttpInstance->Service->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > (VOID **) &Interface, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Handle, > EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER > ); > if (EFI_ERROR(Status)) { > goto ON_ERROR; > @@ -691,11 +691,11 @@ HttpInitProtocol ( > // > // Create TCP6 Child. > // > Status =3D NetLibCreateServiceChild ( > HttpInstance->Service->ControllerHandle, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > &gEfiTcp6ServiceBindingProtocolGuid, > &HttpInstance->Tcp6ChildHandle > ); >=20 > if (EFI_ERROR (Status)) { > @@ -704,11 +704,11 @@ HttpInitProtocol ( >=20 > Status =3D gBS->OpenProtocol ( > HttpInstance->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > (VOID **) &Interface, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Service->ControllerHandle, > EFI_OPEN_PROTOCOL_BY_DRIVER > ); >=20 > if (EFI_ERROR (Status)) { > @@ -717,11 +717,11 @@ HttpInitProtocol ( >=20 > Status =3D gBS->OpenProtocol ( > HttpInstance->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > (VOID **) &HttpInstance->Tcp6, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Handle, > EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER > ); >=20 > if (EFI_ERROR(Status)) { > @@ -730,11 +730,11 @@ HttpInitProtocol ( >=20 > Status =3D gBS->OpenProtocol ( > HttpInstance->Service->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > (VOID **) &Interface, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Handle, > EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER > ); >=20 > if (EFI_ERROR(Status)) { > @@ -754,66 +754,66 @@ ON_ERROR: >=20 > if (HttpInstance->Tcp4ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Service->ControllerHandle > ); >=20 > gBS->CloseProtocol ( > HttpInstance->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Handle > ); >=20 > NetLibDestroyServiceChild ( > HttpInstance->Service->ControllerHandle, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > &gEfiTcp4ServiceBindingProtocolGuid, > HttpInstance->Tcp4ChildHandle > ); > } >=20 > if (HttpInstance->Service->Tcp4ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Service->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Handle > ); > } >=20 > if (HttpInstance->Tcp6ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Service->ControllerHandle > ); >=20 > gBS->CloseProtocol ( > HttpInstance->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Handle > ); >=20 > NetLibDestroyServiceChild ( > HttpInstance->Service->ControllerHandle, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > &gEfiTcp6ServiceBindingProtocolGuid, > HttpInstance->Tcp6ChildHandle > ); > } >=20 > if (HttpInstance->Service->Tcp6ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Service->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Handle > ); > } >=20 > return EFI_UNSUPPORTED; > @@ -866,66 +866,66 @@ HttpCleanProtocol ( >=20 > if (HttpInstance->Tcp4ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Service->ControllerHandle > ); >=20 > gBS->CloseProtocol ( > HttpInstance->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Handle > ); >=20 > NetLibDestroyServiceChild ( > HttpInstance->Service->ControllerHandle, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > &gEfiTcp4ServiceBindingProtocolGuid, > HttpInstance->Tcp4ChildHandle > ); > } >=20 > if (HttpInstance->Service->Tcp4ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Service->Tcp4ChildHandle, > &gEfiTcp4ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip4DriverBindingHandle, > HttpInstance->Handle > ); > } >=20 > if (HttpInstance->Tcp6ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Service->ControllerHandle > ); >=20 > gBS->CloseProtocol ( > HttpInstance->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Handle > ); >=20 > NetLibDestroyServiceChild ( > HttpInstance->Service->ControllerHandle, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > &gEfiTcp6ServiceBindingProtocolGuid, > HttpInstance->Tcp6ChildHandle > ); > } >=20 > if (HttpInstance->Service->Tcp6ChildHandle !=3D NULL) { > gBS->CloseProtocol ( > HttpInstance->Service->Tcp6ChildHandle, > &gEfiTcp6ProtocolGuid, > - HttpInstance->Service->ImageHandle, > + HttpInstance->Service->Ip6DriverBindingHandle, > HttpInstance->Handle > ); > } >=20 > TlsCloseTxRxEvent (HttpInstance); > diff --git a/NetworkPkg/HttpDxe/HttpProto.h > b/NetworkPkg/HttpDxe/HttpProto.h > index ced8aca..95fb484 100644 > --- a/NetworkPkg/HttpDxe/HttpProto.h > +++ b/NetworkPkg/HttpDxe/HttpProto.h > @@ -1,9 +1,9 @@ > /** @file > The header files of miscellaneous routines for HttpDxe driver. >=20 > -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
> +Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
> (C) Copyright 2016 Hewlett Packard Enterprise Development LP
> This program and the accompanying materials > are licensed and made available under the terms and conditions of the BS= D > License > which accompanies this distribution. The full text of the license may b= e found > at > http://opensource.org/licenses/bsd-license.php > @@ -57,11 +57,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY > KIND, EITHER EXPRESS OR IMPLIED. > #define HTTP_URL_BUFFER_LEN 4096 >=20 > typedef struct _HTTP_SERVICE { > UINT32 Signature; > EFI_SERVICE_BINDING_PROTOCOL ServiceBinding; > - EFI_HANDLE ImageHandle; > + EFI_HANDLE Ip4DriverBindingHandle; > + EFI_HANDLE Ip6DriverBindingHandle; > EFI_HANDLE ControllerHandle; > EFI_HANDLE Tcp4ChildHandle; > EFI_HANDLE Tcp6ChildHandle; > LIST_ENTRY ChildrenList; > UINTN ChildrenNumber; > -- > 1.9.5.msysgit.1