From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BAE768224F for ; Wed, 22 Feb 2017 21:31:01 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 22 Feb 2017 21:31:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,197,1484035200"; d="scan'208";a="937113016" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.105]) by orsmga003.jf.intel.com with ESMTP; 22 Feb 2017 21:31:00 -0800 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Hegde Nagaraj P , Subramanian Sriram , Ye Ting , Fu Siyuan , Wu Jiaxin Date: Thu, 23 Feb 2017 13:30:56 +0800 Message-Id: <1487827857-38844-2-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1487827857-38844-1-git-send-email-jiaxin.wu@intel.com> References: <1487827857-38844-1-git-send-email-jiaxin.wu@intel.com> Subject: [Patch 1/2] MdeModulePkg/Ip4Dxe: Ignore duplicated DNS address check X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 05:31:01 -0000 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 --- 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 a6a3da8..0b56d76 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c @@ -703,11 +703,10 @@ Ip4Config2SetDnsServerWorker ( IN VOID *Data ) { UINTN OldIndex; UINTN NewIndex; - UINTN Index1; EFI_IPv4_ADDRESS *OldDns; EFI_IPv4_ADDRESS *NewDns; UINTN OldDnsCount; UINTN NewDnsCount; IP4_CONFIG2_DATA_ITEM *Item; @@ -745,19 +744,10 @@ Ip4Config2SetDnsServerWorker ( FreePool (Tmp); } 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 // comparision below. // -- 1.9.5.msysgit.1