diff options
author | Fu Siyuan <siyuan.fu@intel.com> | 2017-04-21 09:48:09 +0800 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2017-04-24 10:12:09 +0800 |
commit | dd29d8b3565ba8ae2e71c097a95b22af5d1d90a4 (patch) | |
tree | 22c94a9c286770b3596157fa49a2d444de207053 /MdeModulePkg | |
parent | 176eb3a17e79644a4abf1d2612e03166c4692e17 (diff) | |
download | edk2-dd29d8b3565ba8ae2e71c097a95b22af5d1d90a4.zip edk2-dd29d8b3565ba8ae2e71c097a95b22af5d1d90a4.tar.gz edk2-dd29d8b3565ba8ae2e71c097a95b22af5d1d90a4.tar.bz2 |
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>
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index 9a70e90..abc07fb 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -1028,6 +1028,12 @@ IpIoListenHandlerDpc ( }
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) &&
(IpIo->SubnetMask != 0) &&
IP4_NET_EQUAL (IpIo->StationIp, EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), IpIo->SubnetMask) &&
|