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 1/2] MdeModulePkg/Ip4Dxe: Ignore duplicated DNS address check
Date: Thu, 23 Feb 2017 13:30:56 +0800	[thread overview]
Message-ID: <1487827857-38844-2-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>
---
 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



  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 ` Jiaxin Wu [this message]
2017-02-23  5:30 ` [Patch 2/2] NetworkPkg/Ip6Dxe: " Jiaxin Wu
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-2-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