summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c')
-rw-r--r--MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
index 27fef71e2c..9a70e9075d 100644
--- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
+++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
@@ -1029,7 +1029,9 @@ IpIoListenHandlerDpc (
if (IpIo->IpVersion == IP_VERSION_4) {
if ((EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress) != 0) &&
- !NetIp4IsUnicast (EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), 0)) {
+ (IpIo->SubnetMask != 0) &&
+ IP4_NET_EQUAL (IpIo->StationIp, EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), IpIo->SubnetMask) &&
+ !NetIp4IsUnicast (EFI_NTOHL (((EFI_IP4_RECEIVE_DATA *) RxData)->Header->SourceAddress), IpIo->SubnetMask)) {
//
// The source address is not zero and it's not a unicast IP address, discard it.
//
@@ -1300,6 +1302,11 @@ IpIoOpen (
if (OpenData->IpConfigData.Ip4CfgData.RawData) {
return EFI_UNSUPPORTED;
}
+
+ if (!OpenData->IpConfigData.Ip4CfgData.UseDefaultAddress) {
+ IpIo->StationIp = EFI_NTOHL (OpenData->IpConfigData.Ip4CfgData.StationAddress);
+ IpIo->SubnetMask = EFI_NTOHL (OpenData->IpConfigData.Ip4CfgData.SubnetMask);
+ }
Status = IpIo->Ip.Ip4->Configure (
IpIo->Ip.Ip4,