diff options
author | Zhang, Lubo <lubo.zhang@intel.com> | 2017-01-22 09:40:30 +0800 |
---|---|---|
committer | Jiaxin Wu <jiaxin.wu@intel.com> | 2017-01-23 15:19:05 +0800 |
commit | 7cf59c854f35c9680965fe83e9cfd863079ddd73 (patch) | |
tree | 9b7961b49a1fa8f6b1ae4367538d9c1710ed1660 /NetworkPkg/HttpDxe/HttpImpl.c | |
parent | f3fa35a00233b6f2e7653b3b8c3e2b28b8ecbe7f (diff) | |
download | edk2-platforms-7cf59c854f35c9680965fe83e9cfd863079ddd73.tar.xz |
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>
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpImpl.c')
-rw-r--r-- | NetworkPkg/HttpDxe/HttpImpl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 85b0083349..745832b9d0 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -249,6 +249,7 @@ EfiHttpRequest ( HTTP_TOKEN_WRAP *Wrap;
CHAR8 *FileUrl;
UINTN RequestMsgSize;
+ EFI_HANDLE ImageHandle;
//
// Initializations
@@ -371,8 +372,14 @@ EfiHttpRequest ( //
// Use TlsSb to create Tls child and open the TLS protocol.
//
+ if (HttpInstance->LocalAddressIsIPv6) {
+ ImageHandle = HttpInstance->Service->Ip6DriverBindingHandle;
+ } else {
+ ImageHandle = HttpInstance->Service->Ip4DriverBindingHandle;
+ }
+
HttpInstance->TlsChildHandle = TlsCreateChild (
- HttpInstance->Service->ImageHandle,
+ ImageHandle,
&(HttpInstance->Tls),
&(HttpInstance->TlsConfiguration)
);
|