X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FTcp4Dxe%2FTcp4Main.c;fp=MdeModulePkg%2FUniversal%2FNetwork%2FTcp4Dxe%2FTcp4Main.c;h=2679f1b8a01a5f7551427f61e1b0229a2fbda681;hp=8e70e01ab11e45035469272c57deb9553ed859b1;hb=d0e76ac5ce07eb116f8cbea90b7f373d0c127a78;hpb=cab6b79cf4958044aa384dc6c1f6ef62ffd8a357 diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c index 8e70e01ab1..2679f1b8a0 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c @@ -1,7 +1,7 @@ /** @file Implementation of TCP4 protocol services. -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -183,7 +183,8 @@ Tcp4Configure ( CopyMem (&Ip, &TcpConfigData->AccessPoint.StationAddress, sizeof (IP4_ADDR)); CopyMem (&SubnetMask, &TcpConfigData->AccessPoint.SubnetMask, sizeof (IP4_ADDR)); - if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) || !NetIp4IsUnicast (NTOHL (Ip), NTOHL (SubnetMask))) { + if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) || + (SubnetMask != 0 && !NetIp4IsUnicast (NTOHL (Ip), NTOHL (SubnetMask)))) { return EFI_INVALID_PARAMETER; } }