From eed4585ba5915733a88fbb69d565c5e3247753f2 Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Thu, 23 Mar 2017 11:35:14 +0800 Subject: 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 Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Zhang Lubo --- NetworkPkg/DnsDxe/DnsImpl.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'NetworkPkg/DnsDxe/DnsImpl.c') 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.
+Copyright (c) 2016 - 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 @@ -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; + } } } } -- cgit v1.2.3