ShellPkg: Update Ifconfig command to accept 32bit subnet mask.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
Fu Siyuan 2018-08-28 09:49:54 +08:00
parent 12ae56cf28
commit b8bcaafb39
1 changed files with 1 additions and 0 deletions

View File

@ -1032,6 +1032,7 @@ IfConfigSetInterfaceInfo (
SubnetMask = NTOHL (SubnetMask);
TempGateway = NTOHL (TempGateway);
if ((SubnetMask != 0) &&
(SubnetMask != 0xFFFFFFFFu) &&
!NetIp4IsUnicast (TempGateway, SubnetMask)) {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG_INVALID_GATEWAY), gShellNetwork1HiiHandle, VarArg->Arg);
ShellStatus = SHELL_INVALID_PARAMETER;