* [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
* Re: [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib.
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
1 sibling, 0 replies; 3+ messages in thread
From: Wu, Jiaxin @ 2017-04-21 1:56 UTC (permalink / raw)
To: Fu, Siyuan, edk2-devel@lists.01.org; +Cc: Ye, Ting
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Thanks,
Jiaxin
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fu
> Siyuan
> Sent: Friday, April 21, 2017 9:50 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
> Subject: [edk2] [Patch] MdeModulePkg: Discard received broadcast message
> in DxeIpIpLib.
>
> 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
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib.
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
1 sibling, 0 replies; 3+ messages in thread
From: Ye, Ting @ 2017-04-21 1:59 UTC (permalink / raw)
To: Fu, Siyuan, edk2-devel@lists.01.org; +Cc: Wu, Jiaxin
Looks good to me. Please correct your patch title to DxeIpIoLib if it will be included in the check-in log.
Reviewed-by: Ye Ting <ting.ye@intel.com>
Thanks,
Ting
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fu Siyuan
Sent: Friday, April 21, 2017 9:50 AM
To: edk2-devel@lists.01.org
Cc: Ye, Ting <ting.ye@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>
Subject: [edk2] [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib.
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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ 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