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:
Fu Siyuan
2018-08-28 09:48:32 +08:00
parent 1e57188216
commit 12ae56cf28
10 changed files with 164 additions and 34 deletions

View File

@@ -79,6 +79,7 @@ typedef struct {
LIST_ENTRY Link;
IP4_INTERFACE *Interface;
IP4_SERVICE *IpSb;
IP4_PROTOCOL *IpInstance;
IP4_FRAME_CALLBACK CallBack;
@@ -262,6 +263,7 @@ Ip4FreeInterface (
to.
@param[in] CallBack Function to call back when transmit finished.
@param[in] Context Opaque parameter to the call back.
@param[in] IpSb The pointer to the IP4 service binding instance.
@retval EFI_OUT_OF_RESOURCES Failed to allocate resource to send the frame
@retval EFI_NO_MAPPING Can't resolve the MAC for the nexthop
@@ -276,7 +278,8 @@ Ip4SendFrame (
IN NET_BUF *Packet,
IN IP4_ADDR NextHop,
IN IP4_FRAME_CALLBACK CallBack,
IN VOID *Context
IN VOID *Context,
IN IP4_SERVICE *IpSb
);
/**