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:
@@ -55,7 +55,7 @@ typedef struct _IP4_SERVICE IP4_SERVICE;
|
||||
/// Compose the fragment field to be used in the IP4 header.
|
||||
///
|
||||
#define IP4_HEAD_FRAGMENT_FIELD(Df, Mf, Offset) \
|
||||
((UINT16)(((Df) ? 0x4000 : 0) | ((Mf) ? 0x2000 : 0) | (((Offset) >> 3) & 0x1fff)))
|
||||
((UINT16)(((Df) ? IP4_HEAD_DF_MASK : 0) | ((Mf) ? IP4_HEAD_MF_MASK : 0) | (((Offset) >> 3) & IP4_HEAD_OFFSET_MASK)))
|
||||
|
||||
#define IP4_LAST_FRAGMENT(FragmentField) \
|
||||
(((FragmentField) & IP4_HEAD_MF_MASK) == 0)
|
||||
|
Reference in New Issue
Block a user