]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
MdeModulePkg: Update IP4 stack drivers for classless address unicast check.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Impl.c
index 7ed2e5250f1256d85dbd63ed57be08fd95179823..6223895620d87b32987a2058b2d369e530817f6b 100644 (file)
@@ -2,7 +2,7 @@
   Interface routine for Mtftp4.\r
   \r
 (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -192,7 +192,7 @@ Mtftp4OverrideValid (
   IP4_ADDR                  Gateway;\r
 \r
   CopyMem (&Ip, &Override->ServerIp, sizeof (IP4_ADDR));\r
-  if (!NetIp4IsUnicast (NTOHL (Ip), 0)) {\r
+  if (IP4_IS_UNSPECIFIED (NTOHL (Ip)) || IP4_IS_LOCAL_BROADCAST (NTOHL (Ip))) {\r
     return FALSE;\r
   }\r
 \r
@@ -667,10 +667,6 @@ EfiMtftp4Configure (
     Gateway  = NTOHL (Gateway);\r
     ServerIp = NTOHL (ServerIp);\r
 \r
-    if (!NetIp4IsUnicast (ServerIp, 0)) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
-\r
     if (!ConfigData->UseDefaultSetting &&\r
        ((!IP4_IS_VALID_NETMASK (Netmask) || !NetIp4IsUnicast (Ip, Netmask)))) {\r
 \r