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 7FC4A82259 for ; Wed, 22 Feb 2017 21:31:03 -0800 (PST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 22 Feb 2017 21:31:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,197,1484035200"; d="scan'208";a="937113032" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.105]) by orsmga003.jf.intel.com with ESMTP; 22 Feb 2017 21:31:01 -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:57 +0800 Message-Id: <1487827857-38844-3-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 2/2] NetworkPkg/Ip6Dxe: 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:03 -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 --- NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c index e309b69..67037bb 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigImpl.c @@ -1325,11 +1325,10 @@ Ip6ConfigSetDnsServer ( IN VOID *Data ) { UINTN OldIndex; UINTN NewIndex; - UINTN Index1; EFI_IPv6_ADDRESS *OldDns; EFI_IPv6_ADDRESS *NewDns; UINTN OldDnsCount; UINTN NewDnsCount; IP6_CONFIG_DATA_ITEM *Item; @@ -1370,19 +1369,10 @@ Ip6ConfigSetDnsServer ( FreePool (Tmp); } 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 // comparision below. // -- 1.9.5.msysgit.1