public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib.
@ 2017-04-21  1:50 Fu Siyuan
  2017-04-21  1:56 ` Wu, Jiaxin
  2017-04-21  1:59 ` Ye, Ting
  0 siblings, 2 replies; 3+ messages in thread
From: Fu Siyuan @ 2017-04-21  1:50 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ye Ting, Wu Jiaxin

Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
---
 MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 6 ++++++
 1 file changed, 6 insertions(+)

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) &&
-- 
2.7.4.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-21  1:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21  1:50 [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib Fu Siyuan
2017-04-21  1:56 ` Wu, Jiaxin
2017-04-21  1:59 ` Ye, Ting

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox