summaryrefslogtreecommitdiffstats
path: root/NetworkPkg
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/DnsDxe/DnsDriver.c24
-rw-r--r--NetworkPkg/DnsDxe/DnsImpl.c8
-rw-r--r--NetworkPkg/DnsDxe/DnsProtocol.c2
3 files changed, 18 insertions, 16 deletions
diff --git a/NetworkPkg/DnsDxe/DnsDriver.c b/NetworkPkg/DnsDxe/DnsDriver.c
index c000b5f5a5..5dc9afe448 100644
--- a/NetworkPkg/DnsDxe/DnsDriver.c
+++ b/NetworkPkg/DnsDxe/DnsDriver.c
@@ -1,7 +1,7 @@
/** @file
The driver binding and service binding protocol for DnsDxe driver.
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 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
@@ -279,18 +279,16 @@ DnsCreateService (
// Create the timer used to time out the procedure which is used to
// get the default IP address.
//
- if (DnsSb->IpVersion == IP_VERSION_4) {
- Status = gBS->CreateEvent (
- EVT_TIMER,
- TPL_CALLBACK,
- NULL,
- NULL,
- &DnsSb->TimerToGetMap
- );
- if (EFI_ERROR (Status)) {
- FreePool (DnsSb);
- return Status;
- }
+ Status = gBS->CreateEvent (
+ EVT_TIMER,
+ TPL_CALLBACK,
+ NULL,
+ NULL,
+ &DnsSb->TimerToGetMap
+ );
+ if (EFI_ERROR (Status)) {
+ FreePool (DnsSb);
+ return Status;
}
//
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
index 794df1d728..ea3d27da52 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.c
+++ b/NetworkPkg/DnsDxe/DnsImpl.c
@@ -1,7 +1,7 @@
/** @file
DnsDxe support functions implementation.
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2016 - 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
@@ -643,9 +643,11 @@ Dns6GetMapping (
FreePool (Ip6Mode.IcmpTypeList);
}
- if (Ip6Mode.IsConfigured) {
+ if (!Ip6Mode.IsStarted || Ip6Mode.IsConfigured) {
Udp->Configure (Udp, NULL);
- return (BOOLEAN) (Udp->Configure (Udp, UdpCfgData) == EFI_SUCCESS);
+ if (Udp->Configure (Udp, UdpCfgData) == EFI_SUCCESS) {
+ return TRUE;
+ }
}
}
}
diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c
index 0e7ed34b4e..bd189aebbe 100644
--- a/NetworkPkg/DnsDxe/DnsProtocol.c
+++ b/NetworkPkg/DnsDxe/DnsProtocol.c
@@ -1106,7 +1106,9 @@ Dns6Configure (
//
// Config UDP
//
+ gBS->RestoreTPL (OldTpl);
Status = Dns6ConfigUdp (Instance, Instance->UdpIo);
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
if (EFI_ERROR (Status)) {
if (Instance->Dns6CfgData.DnsServerList != NULL) {
FreePool (Instance->Dns6CfgData.DnsServerList);