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.151; helo=mga17.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 A9BBC2258AF13 for ; Mon, 12 Mar 2018 01:24:25 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2018 01:30:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,460,1515484800"; d="scan'208";a="34235216" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.126]) by orsmga003.jf.intel.com with ESMTP; 12 Mar 2018 01:30:44 -0700 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Fu Siyuan , Ye Ting Date: Mon, 12 Mar 2018 16:30:40 +0800 Message-Id: <20180312083040.15292-1-jiaxin.wu@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Subject: [Patch 1/2] NetworkPkg/IScsiDxe: Fix the ISCSI connection failure in certain case. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 08:24:26 -0000 The ISCSI connection will fail for the first time if the target info is retrieved from DHCP and expressed as URI format. The issue is caused by the missing DNS protocol dependency check during the driver support function. This patch is to fix the above issue. Cc: Fu Siyuan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu --- NetworkPkg/IScsiDxe/IScsiMisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMisc.c index 94f3725866..745b7ac07b 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -1982,11 +1982,11 @@ IScsiDnsIsConfigured ( if (AttemptTmp->SessionConfigData.Enabled == ISCSI_DISABLED || StrCmp (MacString, AttemptMacString)) { FreePool (AttemptTmp); continue; } - if (AttemptTmp->SessionConfigData.DnsMode) { + if (AttemptTmp->SessionConfigData.DnsMode || AttemptTmp->SessionConfigData.TargetInfoFromDhcp) { FreePool (AttemptTmp); FreePool (AttemptConfigOrder); return TRUE; } else { FreePool (AttemptTmp); -- 2.16.2.windows.1