MdeModulePkg: Update IP4 stack drivers for classless address unicast check.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
@@ -943,9 +943,9 @@ ArpConfigureInstance (
|
||||
if (ConfigData->SwAddressType == IPV4_ETHER_PROTO_TYPE) {
|
||||
CopyMem (&Ip, ConfigData->StationAddress, sizeof (IP4_ADDR));
|
||||
|
||||
if (!NetIp4IsUnicast (NTOHL (Ip), 0)) {
|
||||
if (IP4_IS_UNSPECIFIED (Ip) || IP4_IS_LOCAL_BROADCAST (Ip)) {
|
||||
//
|
||||
// The station address is not a valid IPv4 unicast address.
|
||||
// The station address should not be zero or broadcast address.
|
||||
//
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
Reference in New Issue
Block a user