From a2f4b153ac5d0039f81bb689ad32cd48ac2aa51d Mon Sep 17 00:00:00 2001 From: Jiaxin Wu Date: Thu, 23 Feb 2017 13:27:18 +0800 Subject: [PATCH 1/1] MdeModulePkg/Ip4Dxe: Ignore duplicated DNS address check 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 Cc: Subramanian Sriram Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Subramanian Sriram Reviewed-by: Hegde Nagaraj P Tested-by: Hegde Nagaraj P --- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c index 504f2477da..6c7ac68791 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c @@ -705,7 +705,6 @@ Ip4Config2SetDnsServerWorker ( { UINTN OldIndex; UINTN NewIndex; - UINTN Index1; EFI_IPv4_ADDRESS *OldDns; EFI_IPv4_ADDRESS *NewDns; UINTN OldDnsCount; @@ -747,15 +746,6 @@ Ip4Config2SetDnsServerWorker ( return EFI_INVALID_PARAMETER; } - for (Index1 = NewIndex + 1; Index1 < NewDnsCount; Index1++) { - if (EFI_IP4_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 -- 2.39.2