From nobody Fri Nov 1 12:27:46 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 1516691671399116.51226014574502; Mon, 22 Jan 2018 23:14:31 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EB0B72233379B; Mon, 22 Jan 2018 23:09:00 -0800 (PST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 128B622333797 for ; Mon, 22 Jan 2018 23:08:58 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jan 2018 23:14:25 -0800 Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.75]) by fmsmga005.fm.intel.com with ESMTP; 22 Jan 2018 23:14:24 -0800 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=192.55.52.120; helo=mga04.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,400,1511856000"; d="scan'208";a="197843893" From: Jiaxin Wu To: edk2-devel@lists.01.org Date: Tue, 23 Jan 2018 15:14:22 +0800 Message-Id: <1516691662-12156-1-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 Subject: [edk2] [Patch] MdeModulePkg/UefiBootManagerLib: Skip the DNS device path node check. 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: , Cc: Ruiyu Ni , 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" After HTTP boot successfully in home mode, the HTTP device path will be updated accordingly. So, the new device path may be appended with a DNS device path node. When executing home mode boot again, the original HTTP device path will mismatch with the new updated one, which will cause the HTTP boot failure. So, we need update the current match algorithm to match the correct FilePath. Since the DNS device path is an optional, we can skip it check. This patch is to fix above issue. Cc: Ruiyu Ni Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Reviewed-by: Ruiyu Ni --- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index d684482..6404233 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1,9 +1,9 @@ /** @file Library functions which relates with booting. =20 -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at http://opensource.org/licenses/bsd-license.php @@ -1117,10 +1117,18 @@ BmMatchHttpBootDevicePath ( if (CompareMem (Left, Right, DevicePathNodeLength (Left)) !=3D 0) { if ((DevicePathType (Left) !=3D MESSAGING_DEVICE_PATH) || (DevicePat= hType (Right) !=3D MESSAGING_DEVICE_PATH)) { return FALSE; } =20 + if (DevicePathSubType (Left) =3D=3D MSG_DNS_DP) { + Left =3D NextDevicePathNode (Left); + } + + if (DevicePathSubType (Right) =3D=3D MSG_DNS_DP) { + Right =3D NextDevicePathNode (Right); + } + if (((DevicePathSubType (Left) !=3D MSG_IPv4_DP) || (DevicePathSubTy= pe (Right) !=3D MSG_IPv4_DP)) && ((DevicePathSubType (Left) !=3D MSG_IPv6_DP) || (DevicePathSubTy= pe (Right) !=3D MSG_IPv6_DP)) && ((DevicePathSubType (Left) !=3D MSG_URI_DP) || (DevicePathSubTy= pe (Right) !=3D MSG_URI_DP)) ) { return FALSE; --=20 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel