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:
@ -509,8 +509,9 @@ Mtftp4Start (
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
gBS->RestoreTPL(OldTpl);
|
||||
|
||||
if (Token->Event != NULL) {
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@ -522,7 +523,6 @@ Mtftp4Start (
|
||||
This->Poll (This);
|
||||
}
|
||||
|
||||
gBS->RestoreTPL (OldTpl);
|
||||
return Token->Status;
|
||||
|
||||
ON_ERROR:
|
||||
@ -682,7 +682,7 @@ EfiMtftp4Configure (
|
||||
}
|
||||
|
||||
if ((Gateway != 0) &&
|
||||
(!IP4_NET_EQUAL (Gateway, Ip, Netmask) || (Netmask != 0 && !NetIp4IsUnicast (Gateway, Netmask)))) {
|
||||
((Netmask != 0xFFFFFFFF && !IP4_NET_EQUAL (Gateway, Ip, Netmask)) || (Netmask != 0 && !NetIp4IsUnicast (Gateway, Netmask)))) {
|
||||
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
Reference in New Issue
Block a user