]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg/Ip6Dxe: Ignore duplicated DNS address check
authorJiaxin Wu <jiaxin.wu@intel.com>
Thu, 23 Feb 2017 05:28:57 +0000 (13:28 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Mon, 27 Feb 2017 06:57:26 +0000 (14:57 +0800)
Having duplicated DNS server IPs specified is not an ideal
configuration, but not an error condition. This patch is to
remove the duplicated DNS address check to allow the same DNS
address setting in SetData().

Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.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: Subramanian Sriram <sriram-s@hpe.com>
Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c

index 9287475e087a40da9cf157769c659fbfd91ab81b..bde5982b69b6883fed9859bd0bf083c1b2ba17c2 100644 (file)
@@ -1327,7 +1327,6 @@ Ip6ConfigSetDnsServer (
 {\r
   UINTN                 OldIndex;\r
   UINTN                 NewIndex;\r
-  UINTN                 Index1;\r
   EFI_IPv6_ADDRESS      *OldDns;\r
   EFI_IPv6_ADDRESS      *NewDns;\r
   UINTN                 OldDnsCount;\r
@@ -1372,15 +1371,6 @@ Ip6ConfigSetDnsServer (
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
-    for (Index1 = NewIndex + 1; Index1 < NewDnsCount; Index1++) {\r
-      if (EFI_IP6_EQUAL (NewDns + NewIndex, NewDns + Index1)) {\r
-        if (Tmp != NULL) {\r
-          FreePool (Tmp);\r
-        }\r
-        return EFI_INVALID_PARAMETER;\r
-      }\r
-    }\r
-\r
     if (OneAdded) {\r
       //\r
       // If any address in the new setting is not in the old settings, skip the\r