summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/DnsDxe/DnsDriver.c
diff options
context:
space:
mode:
authorJiaxin Wu <jiaxin.wu@intel.com>2017-03-23 11:35:14 +0800
committerJiaxin Wu <jiaxin.wu@intel.com>2017-03-30 11:31:47 +0800
commiteed4585ba5915733a88fbb69d565c5e3247753f2 (patch)
tree28ed0400fbaa62ac75e09d7ffad7aa8010c271d2 /NetworkPkg/DnsDxe/DnsDriver.c
parent6e7ec25aaaf0dfc2b4c84ffd4c7ee7cd442aecb6 (diff)
downloadedk2-eed4585ba5915733a88fbb69d565c5e3247753f2.tar.gz
edk2-eed4585ba5915733a88fbb69d565c5e3247753f2.tar.bz2
edk2-eed4585ba5915733a88fbb69d565c5e3247753f2.zip
NetworkPkg/DnsDxe: Fix zero StationIp configuration failure of DNSv6
According UEFI Spec, set to zero StationIp means to let the underlying IPv6 driver choose a source address. But currently, DNSv6 always return EFI_NO_MAPPING. The issue is caused by below bugs in DnsDxe: * Incorrect TPL(TPL_CALLBACK) usage during UDP configuration. * Failed to create the timer used to get IPv6 mapping * Doesn't check the Ip6Mode.IsStarted flag. Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
Diffstat (limited to 'NetworkPkg/DnsDxe/DnsDriver.c')
-rw-r--r--NetworkPkg/DnsDxe/DnsDriver.c24
1 files changed, 11 insertions, 13 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;
}
//