]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/DnsDxe/DnsProtocol.c
MdeModulePkg/PciHostBridge: Add IOMMU support.
[mirror_edk2.git] / NetworkPkg / DnsDxe / DnsProtocol.c
index 6d117b2892d336346d4e633b406fc60936f7fbeb..bd189aebbe1c2b02f21417281bebcf6ee8c3c3ca 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation of EFI_DNS4_PROTOCOL and EFI_DNS6_PROTOCOL interfaces.\r
 \r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -246,7 +246,7 @@ Dns4Configure (
     Netmask  = NTOHL (Netmask);\r
 \r
     if (!DnsConfigData->UseDefaultSetting &&\r
-       ((!IP4_IS_VALID_NETMASK (Netmask) || !NetIp4IsUnicast (Ip, Netmask)))) {\r
+        ((!IP4_IS_VALID_NETMASK (Netmask) || (Netmask != 0 && !NetIp4IsUnicast (Ip, Netmask))))) {\r
       Status = EFI_INVALID_PARAMETER;\r
       goto ON_EXIT;\r
     }\r
@@ -1106,7 +1106,9 @@ Dns6Configure (
     //\r
     // Config UDP\r
     //\r
+    gBS->RestoreTPL (OldTpl);\r
     Status = Dns6ConfigUdp (Instance, Instance->UdpIo);\r
+    OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
     if (EFI_ERROR (Status)) {\r
       if (Instance->Dns6CfgData.DnsServerList != NULL) {\r
         FreePool (Instance->Dns6CfgData.DnsServerList);\r