From nobody Thu Dec 26 01:12:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1508309606007948.9483132971814; Tue, 17 Oct 2017 23:53:26 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9BA6C21CE740C; Tue, 17 Oct 2017 23:49:47 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 18714202E60E1 for ; Tue, 17 Oct 2017 23:49:46 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 17 Oct 2017 23:53:22 -0700 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.187]) by fmsmga005.fm.intel.com with ESMTP; 17 Oct 2017 23:53:20 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,394,1503385200"; d="scan'208";a="163909573" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Wed, 18 Oct 2017 14:53:15 +0800 Message-Id: <1508309596-13880-3-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1508309596-13880-1-git-send-email-jiaxin.wu@intel.com> References: <1508309596-13880-1-git-send-email-jiaxin.wu@intel.com> Subject: [edk2] [Patch v3 2/3] NetworkPkg/IScsiDxe: Clean the previous ConfigData when switching the IP mode. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karunakar P , Ye Ting , Fu Siyuan , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Karunakar P Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/IScsiDxe/IScsiConfig.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c b/NetworkPkg/IScsiDxe/IScsiC= onfig.c index 52e51d6..f20f590 100644 --- a/NetworkPkg/IScsiDxe/IScsiConfig.c +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c @@ -3590,13 +3590,20 @@ IScsiFormCallback ( =20 case KEY_IP_MODE: switch (Value->u8) { case IP_MODE_IP6: case IP_MODE_IP4: + ZeroMem (IfrNvData->LocalIp, sizeof (IfrNvData->LocalIp)); + ZeroMem (IfrNvData->SubnetMask, sizeof (IfrNvData->SubnetMask)); + ZeroMem (IfrNvData->Gateway, sizeof (IfrNvData->Gateway)); ZeroMem (IfrNvData->TargetIp, sizeof (IfrNvData->TargetIp)); Private->Current->AutoConfigureMode =3D 0; - + ZeroMem (&Private->Current->SessionConfigData.LocalIp, sizeof (EFI= _IP_ADDRESS)); + ZeroMem (&Private->Current->SessionConfigData.SubnetMask, sizeof (= EFI_IPv4_ADDRESS)); + ZeroMem (&Private->Current->SessionConfigData.Gateway, sizeof (EFI= _IP_ADDRESS)); + ZeroMem (&Private->Current->SessionConfigData.TargetIp, sizeof (EF= I_IP_ADDRESS)); + =20 break; } =20 break; =20 --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel