MdeModulePkg/Network: Add 32bit subnet mask support for IP4 PXE boot.
This patch updates IP4 stack to support 32bit subnet mask in PXE boot process. When 32bit subnet mask is used, the IP4 driver couldn't use the subnet mask to determine whether destination IP address is on-link or not, so it will always try to send all the packets to the destination IP address directly first, if failed it will continue to try the default gateway. Contributed-under: TianoCore Contribution Agreement 1.1 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>
This commit is contained in:
@@ -1259,7 +1259,7 @@ EfiIp4Routes (
|
||||
// the gateway address must be a unicast on the connected network if not zero.
|
||||
//
|
||||
if ((Nexthop != IP4_ALLZERO_ADDRESS) &&
|
||||
(!IP4_NET_EQUAL (Nexthop, IpIf->Ip, IpIf->SubnetMask) ||
|
||||
((IpIf->SubnetMask != IP4_ALLONE_ADDRESS && !IP4_NET_EQUAL (Nexthop, IpIf->Ip, IpIf->SubnetMask)) ||
|
||||
IP4_IS_BROADCAST (Ip4GetNetCast (Nexthop, IpIf)))) {
|
||||
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
|
Reference in New Issue
Block a user