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 <lubo.zhang@intel.com> Cc: Sriram Subramanian <sriram-s@hpe.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Sriram Subramanian <sriram-s@hpe.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Routines for HttpDxe driver to perform DNS resolution based on UEFI DNS protocols.
|
||||
|
||||
Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 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
|
||||
@@ -88,7 +88,7 @@ HttpDns4 (
|
||||
//
|
||||
Status = NetLibCreateServiceChild (
|
||||
Service->ControllerHandle,
|
||||
Service->ImageHandle,
|
||||
Service->Ip4DriverBindingHandle,
|
||||
&gEfiDns4ServiceBindingProtocolGuid,
|
||||
&Dns4Handle
|
||||
);
|
||||
@@ -100,7 +100,7 @@ HttpDns4 (
|
||||
Dns4Handle,
|
||||
&gEfiDns4ProtocolGuid,
|
||||
(VOID **) &Dns4,
|
||||
Service->ImageHandle,
|
||||
Service->Ip4DriverBindingHandle,
|
||||
Service->ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
@@ -196,7 +196,7 @@ Exit:
|
||||
gBS->CloseProtocol (
|
||||
Dns4Handle,
|
||||
&gEfiDns4ProtocolGuid,
|
||||
Service->ImageHandle,
|
||||
Service->Ip4DriverBindingHandle,
|
||||
Service->ControllerHandle
|
||||
);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ Exit:
|
||||
if (Dns4Handle != NULL) {
|
||||
NetLibDestroyServiceChild (
|
||||
Service->ControllerHandle,
|
||||
Service->ImageHandle,
|
||||
Service->Ip4DriverBindingHandle,
|
||||
&gEfiDns4ServiceBindingProtocolGuid,
|
||||
Dns4Handle
|
||||
);
|
||||
@@ -290,7 +290,7 @@ HttpDns6 (
|
||||
//
|
||||
Status = NetLibCreateServiceChild (
|
||||
Service->ControllerHandle,
|
||||
Service->ImageHandle,
|
||||
Service->Ip6DriverBindingHandle,
|
||||
&gEfiDns6ServiceBindingProtocolGuid,
|
||||
&Dns6Handle
|
||||
);
|
||||
@@ -302,7 +302,7 @@ HttpDns6 (
|
||||
Dns6Handle,
|
||||
&gEfiDns6ProtocolGuid,
|
||||
(VOID **) &Dns6,
|
||||
Service->ImageHandle,
|
||||
Service->Ip6DriverBindingHandle,
|
||||
Service->ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
);
|
||||
@@ -393,7 +393,7 @@ Exit:
|
||||
gBS->CloseProtocol (
|
||||
Dns6Handle,
|
||||
&gEfiDns6ProtocolGuid,
|
||||
Service->ImageHandle,
|
||||
Service->Ip6DriverBindingHandle,
|
||||
Service->ControllerHandle
|
||||
);
|
||||
}
|
||||
@@ -401,7 +401,7 @@ Exit:
|
||||
if (Dns6Handle != NULL) {
|
||||
NetLibDestroyServiceChild (
|
||||
Service->ControllerHandle,
|
||||
Service->ImageHandle,
|
||||
Service->Ip6DriverBindingHandle,
|
||||
&gEfiDns6ServiceBindingProtocolGuid,
|
||||
Dns6Handle
|
||||
);
|
||||
|
Reference in New Issue
Block a user