X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FIp6Dxe%2FIp6ConfigImpl.c;h=bde5982b69b6883fed9859bd0bf083c1b2ba17c2;hb=9508a4ac3d756fa6713366afaa3e12063aef5dc9;hp=4e881fd6df20e3b65249ed141c67532a66bfea58;hpb=ab50ab6ea159821d780be60759874dcf38835d1b;p=mirror_edk2.git diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index 4e881fd6df..bde5982b69 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -1327,7 +1327,6 @@ Ip6ConfigSetDnsServer ( { UINTN OldIndex; UINTN NewIndex; - UINTN Index1; EFI_IPv6_ADDRESS *OldDns; EFI_IPv6_ADDRESS *NewDns; UINTN OldDnsCount; @@ -1372,15 +1371,6 @@ Ip6ConfigSetDnsServer ( return EFI_INVALID_PARAMETER; } - for (Index1 = NewIndex + 1; Index1 < NewDnsCount; Index1++) { - if (EFI_IP6_EQUAL (NewDns + NewIndex, NewDns + Index1)) { - if (Tmp != NULL) { - FreePool (Tmp); - } - return EFI_INVALID_PARAMETER; - } - } - if (OneAdded) { // // If any address in the new setting is not in the old settings, skip the @@ -1438,11 +1428,12 @@ Ip6ConfigInitIfInfo ( OUT EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo ) { - IfInfo->Name[0] = L'e'; - IfInfo->Name[1] = L't'; - IfInfo->Name[2] = L'h'; - IfInfo->Name[3] = (CHAR16) (L'0' + IpSb->Ip6ConfigInstance.IfIndex); - IfInfo->Name[4] = 0; + UnicodeSPrint ( + IfInfo->Name, + sizeof (IfInfo->Name), + L"eth%d", + IpSb->Ip6ConfigInstance.IfIndex + ); IfInfo->IfType = IpSb->SnpMode.IfType; IfInfo->HwAddressSize = IpSb->SnpMode.HwAddressSize;