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:
@@ -194,6 +194,11 @@ Ip4FreeRouteCacheEntry (
|
||||
@param[in] RtTable The route table to search from
|
||||
@param[in] Dest The destination address to search for
|
||||
@param[in] Src The source address to search for
|
||||
@param[in] SubnetMask The subnet mask of the Src address, this field is
|
||||
used to check if the station is using /32 subnet.
|
||||
@param[in] AlwaysTryDestAddr Always try to use the dest address as next hop even
|
||||
though we can't find a matching route entry. This
|
||||
field is only valid when using /32 subnet.
|
||||
|
||||
@return NULL if failed to route packet, otherwise a route cache
|
||||
entry that can be used to route packet.
|
||||
@@ -203,7 +208,9 @@ IP4_ROUTE_CACHE_ENTRY *
|
||||
Ip4Route (
|
||||
IN IP4_ROUTE_TABLE *RtTable,
|
||||
IN IP4_ADDR Dest,
|
||||
IN IP4_ADDR Src
|
||||
IN IP4_ADDR Src,
|
||||
IN IP4_ADDR SubnetMask,
|
||||
IN BOOLEAN AlwaysTryDestAddr
|
||||
);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user