From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=siyuan.fu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CE187210F2D10 for ; Mon, 27 Aug 2018 18:53:09 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Aug 2018 18:53:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,297,1531810800"; d="scan'208";a="85013073" Received: from shwdeopenpsi787.ccr.corp.intel.com ([10.239.158.38]) by fmsmga001.fm.intel.com with ESMTP; 27 Aug 2018 18:52:44 -0700 From: Fu Siyuan To: edk2-devel@lists.01.org Cc: Ruiyu Ni , Ye Ting , Wu Jiaxin Date: Tue, 28 Aug 2018 09:52:35 +0800 Message-Id: <20180828015235.60368-3-siyuan.fu@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 In-Reply-To: <20180828015235.60368-1-siyuan.fu@intel.com> References: <20180828015235.60368-1-siyuan.fu@intel.com> Subject: [Patch 2/2] ShellPkg: Update Ifconfig command to accept 32bit subnet mask. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2018 01:53:10 -0000 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Fu Siyuan Cc: Ruiyu Ni Cc: Ye Ting Cc: Wu Jiaxin --- ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c index 52415e0ad0..e9f644c739 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; -- 2.18.0.windows.1