public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiaxin Wu <jiaxin.wu@intel.com>
To: edk2-devel@lists.01.org
Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>,
	Subramanian Sriram <sriram-s@hpe.com>,
	Ye Ting <ting.ye@intel.com>, Fu Siyuan <siyuan.fu@intel.com>,
	Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch 2/2] NetworkPkg/Ip6Dxe: Ignore duplicated DNS address check
Date: Thu, 23 Feb 2017 13:30:57 +0800	[thread overview]
Message-ID: <1487827857-38844-3-git-send-email-jiaxin.wu@intel.com> (raw)
In-Reply-To: <1487827857-38844-1-git-send-email-jiaxin.wu@intel.com>

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 <nagaraj-p.hegde@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
---
 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



  parent reply	other threads:[~2017-02-23  5:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23  5:30 [Patch 0/2] Ignore duplicated DNS address check Jiaxin Wu
2017-02-23  5:30 ` [Patch 1/2] MdeModulePkg/Ip4Dxe: " Jiaxin Wu
2017-02-23  5:30 ` Jiaxin Wu [this message]
2017-02-23 10:25 ` [Patch 0/2] " Subramanian, Sriram
2017-02-27  6:37 ` Hegde, Nagaraj P

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487827857-38844-3-git-send-email-jiaxin.wu@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox