MdeModulePkg: Discard received broadcast message in DxeIpIoLib.
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:
parent
176eb3a17e
commit
dd29d8b356
@ -1028,6 +1028,12 @@ IpIoListenHandlerDpc (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (IpIo->IpVersion == IP_VERSION_4) {
|
if (IpIo->IpVersion == IP_VERSION_4) {
|
||||||
|
if (IP4_IS_LOCAL_BROADCAST (EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress))) {
|
||||||
|
//
|
||||||
|
// The source address is a broadcast address, discard it.
|
||||||
|
//
|
||||||
|
goto CleanUp;
|
||||||
|
}
|
||||||
if ((EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress) != 0) &&
|
if ((EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress) != 0) &&
|
||||||
(IpIo->SubnetMask != 0) &&
|
(IpIo->SubnetMask != 0) &&
|
||||||
IP4_NET_EQUAL (IpIo->StationIp, EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), IpIo->SubnetMask) &&
|
IP4_NET_EQUAL (IpIo->StationIp, EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), IpIo->SubnetMask) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user