]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c
MdePkg/SmmIoLib: Add header file.
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6ConfigImpl.c
index e309b69d775d4cdb9cdd05b94f3589d9d7cc6d72..7575b7947d9989d724ff590abe117b0ce73eb596 100644 (file)
@@ -784,6 +784,10 @@ Ip6ManualAddrDadCallback (
   Item       = &Instance->DataItem[Ip6ConfigDataTypeManualAddress];\r
   ManualAddr = NULL;\r
 \r
+  if (Item->DataSize == 0) {\r
+    return;\r
+  }\r
+\r
   for (Index = 0; Index < Item->DataSize / sizeof (EFI_IP6_CONFIG_MANUAL_ADDRESS); Index++) {\r
     //\r
     // Find the original tag used to place into the NET_MAP.\r
@@ -1327,7 +1331,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 +1375,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
@@ -1441,7 +1435,7 @@ Ip6ConfigInitIfInfo (
   UnicodeSPrint (\r
     IfInfo->Name,\r
     sizeof (IfInfo->Name),\r
-    L"eth%x",\r
+    L"eth%d",\r
     IpSb->Ip6ConfigInstance.IfIndex\r
   );\r
 \r