summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2016-10-27 09:23:08 +0800
committerFu Siyuan <siyuan.fu@intel.com>2016-10-28 14:20:10 +0800
commit01b5ac880f00cf89833e6fc80666bccc9779dea7 (patch)
tree7809986a78952db2dfec814b5b94adca13d17f17 /MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
parent3289dcba45e48af5c4fd329f57c49cc8e5830ed8 (diff)
downloadedk2-platforms-01b5ac880f00cf89833e6fc80666bccc9779dea7.tar.xz
MdeModulePkg: Update IP4 stack drivers for classless address unicast check.
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/Universal/Network/Udp4Dxe/Udp4Main.c')
-rw-r--r--MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
index 5ea22acb14..bdb79b3abd 100644
--- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
+++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c
@@ -1,7 +1,7 @@
/** @file
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -171,9 +171,9 @@ Udp4Configure (
if (!UdpConfigData->UseDefaultAddress &&
- (!IP4_IS_VALID_NETMASK (SubnetMask) ||
- !((StationAddress == 0) || NetIp4IsUnicast (StationAddress, SubnetMask)) ||
- !((RemoteAddress == 0) || NetIp4IsUnicast (RemoteAddress, 0)))) {
+ (!IP4_IS_VALID_NETMASK (SubnetMask) ||
+ !((StationAddress == 0) || NetIp4IsUnicast (StationAddress, SubnetMask)) ||
+ IP4_IS_LOCAL_BROADCAST (RemoteAddress))) {
//
// Don't use default address, and subnet mask is invalid or StationAddress is not
// a valid unicast IPv4 address or RemoteAddress is not a valid unicast IPv4 address