X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ShellPkg%2FLibrary%2FUefiShellNetwork1CommandsLib%2FIfconfig.c;h=cdc6db69c34e0372b18ee74e98eb907f12990679;hp=52415e0ad0ca931f1c73eaad788041df3edbcbff;hb=4b2dc555d8a67e715d8fafab4c9131791d31a788;hpb=ba0014b9f8ae1a593f03e744f26008214c2b06a8 diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c index 52415e0ad0..cdc6db69c3 100644 --- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c +++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c @@ -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;