From: Fu Siyuan <siyuan.fu@intel.com>
To: edk2-devel@lists.01.org
Cc: Ye Ting <ting.ye@intel.com>, Wu Jiaxin <jiaxin.wu@intel.com>
Subject: [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib.
Date: Fri, 21 Apr 2017 09:50:04 +0800 [thread overview]
Message-ID: <1492739404-13540-1-git-send-email-siyuan.fu@intel.com> (raw)
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
next reply other threads:[~2017-04-21 1:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-21 1:50 Fu Siyuan [this message]
2017-04-21 1:56 ` [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib Wu, Jiaxin
2017-04-21 1:59 ` Ye, Ting
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492739404-13540-1-git-send-email-siyuan.fu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox