From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0715.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe42::715]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7270581B25 for ; Sat, 21 Jan 2017 22:28:26 -0800 (PST) Received: from DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.143) by DF4PR84MB0042.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Sun, 22 Jan 2017 06:28:24 +0000 Received: from DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.143]) by DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.143]) with mapi id 15.01.0860.020; Sun, 22 Jan 2017 06:28:24 +0000 From: "Subramanian, Sriram" To: Zhang Lubo , "edk2-devel@lists.01.org" CC: Ye Ting , Fu Siyuan , Wu Jiaxin Thread-Topic: [patch] NetworkPkg: Fix protocol handler service in HttpDxe. Thread-Index: AQHSdFCrLgM+La9SKEytasuU2XcXzaFECJAQ Date: Sun, 22 Jan 2017 06:28:24 +0000 Message-ID: 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: authentication-results: spf=none (sender IP is ) smtp.mailfrom=sriram-s@hpe.com; x-originating-ip: [106.51.19.76] x-ms-office365-filtering-correlation-id: 9f720eb0-6760-461b-dd61-08d4428fde49 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DF4PR84MB0042; x-microsoft-exchange-diagnostics: 1; DF4PR84MB0042; 7:YnJBJ2GY3YF7z7bHp6sk4f81zB2wg8IqEp2MCrtcAOvsQQRofxxTwxL4h576QYCjJZsq6umFumYKFpechN6Vlrrdr5lV8LE8BGZzR6E1zaHQuItoRxYoO0MUqS42QmX1yL9a8I6Qd9MypE2awj4PxT67me/l0cpZq8I452k7+HE05uzbmb7zp8erxyCyJZFepWLLXl00P9cF1sbyHUVjzMsenTpbYWfru3DA1AGsYtDVIWzgzXdgdk/rW8rkLNX1hhN/HXWVeChcy2JQI7aJHDOX0FDQzebCE3OAtmoq9KPIQtDH6iqsSCTdhXNxeDwIcJaJQZDh9ifjraW1rQJZarBSH24pagpbSXm9Uwkx2IiUoJfajO8UifY4KOkQy6Es+rWnSo70nPaQvEsGERJHNZO3ubWXmcrGgCFa29nLj66ggUlcsjkGHiXEsSyluK/YG2P1nty10PZKlY4mAxoq+w== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(227479698468861)(162533806227266)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148)(6042181); SRVR:DF4PR84MB0042; BCL:0; PCL:0; RULEID:; SRVR:DF4PR84MB0042; x-forefront-prvs: 01952C6E96 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(13464003)(199003)(189002)(377454003)(575784001)(8676002)(9456002)(15395725005)(229853002)(2900100001)(3280700002)(86362001)(9686003)(2950100002)(55016002)(33656002)(92566002)(54906002)(66066001)(8936002)(50986999)(76176999)(6436002)(6306002)(305945005)(7736002)(54356999)(81166006)(7696004)(81156014)(38730400001)(74316002)(5001770100001)(6506006)(2906002)(77096006)(68736007)(15188155005)(106116001)(122556002)(97736004)(106356001)(3660700001)(105586002)(2501003)(53946003)(16799955002)(189998001)(102836003)(6116002)(5660300001)(53936002)(3846002)(4326007)(101416001)(579004)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:DF4PR84MB0042; H:DF4PR84MB0041.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hpe.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Jan 2017 06:28:24.0219 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0042 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 06:28:26 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Sriram Subramanian Tested-by: Sriram Subramanian -----Original Message----- From: Zhang Lubo [mailto:lubo.zhang@intel.com]=20 Sent: Sunday, January 22, 2017 7:11 AM To: edk2-devel@lists.01.org Cc: Subramanian, Sriram ; Ye Ting ; Fu= Siyuan ; Wu Jiaxin Subject: [patch] NetworkPkg: Fix protocol handler service in HttpDxe. 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. 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(-) 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 DNS = 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 BSD = License which accompanies this distribution. The full text of the license may be = 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/HttpDrive= r.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 BS= D License which accompanies this distribution. The full text of the license may b= e 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 bind= ing 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 cre= ated. =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 HttpServiceBindingCreateChil= d; HttpService->ServiceBinding.DestroyChild =3D HttpServiceBindingDestroyCh= ild; - 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->DriverBindingHan= dle, &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) { - =20 + HttpService->Ip4DriverBindingHandle =3D This->DriverBindingHandle; + if (HttpService->Tcp4ChildHandle =3D=3D NULL) { // // Create a TCP4 child instance, but do not configure it. This will = establish the parent-child relationship. // Status =3D NetLibCreateServiceChild ( @@ -438,11 +436,12 @@ HttpDxeStart ( return EFI_ALREADY_STARTED; } =20 } else { UsingIpv6 =3D TRUE; - =20 + HttpService->Ip6DriverBindingHandle =3D This->DriverBindingHandle; + if (HttpService->Tcp6ChildHandle =3D=3D NULL) { // // Create a TCP6 child instance, but do not configure it. This will = 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 BS= D License which accompanies this distribution. The full text of the license may b= e 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 NULL= ) { // // 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->ImageHandle, + 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 =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 =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);=20 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 BSD = License which accompanies this distribution. The full text of the license may be = found at http://opensource.org/licenses/bsd-license.php @@ -57,11 +57,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITH= ER 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; --=20 1.9.5.msysgit.1