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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel