From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 5017221C91264 for ; Tue, 25 Jul 2017 05:10:51 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2017 05:12:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,411,1496127600"; d="scan'208";a="1155145662" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.255.27.40]) by orsmga001.jf.intel.com with ESMTP; 25 Jul 2017 05:12:51 -0700 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Ye Ting , Fu Siyuan , Wu Jiaxin Date: Tue, 25 Jul 2017 20:12:44 +0800 Message-Id: <1500984765-8040-4-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1500984765-8040-1-git-send-email-jiaxin.wu@intel.com> References: <1500984765-8040-1-git-send-email-jiaxin.wu@intel.com> Subject: [Patch 3/4] MdeModulePkg/UefiBootManagerLib: Support DNS device path description 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: , X-List-Received-Date: Tue, 25 Jul 2017 12:10:51 -0000 This patch is to update UEFI Boot manager to support DNS device path for HTTP(S) network boot. Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c index 6e69a15..7647bac 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c @@ -385,12 +385,12 @@ BmGetNetworkDescription ( // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)] // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...) // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...) // // The HTTP device path is like: - // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)/Uri(...) - // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)/Uri(...) + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv4(...)[/Dns(...)]/Uri(...) + // ....../Mac(...)[/Vlan(...)][/Wi-Fi(...)]/IPv6(...)[/Dns(...)]/Uri(...) // while (!IsDevicePathEnd (DevicePath) && ((DevicePathType (DevicePath) != MESSAGING_DEVICE_PATH) || (DevicePathSubType (DevicePath) != MSG_MAC_ADDR_DP)) ) { @@ -435,10 +435,19 @@ BmGetNetworkDescription ( Ip = DevicePath; DevicePath = NextDevicePathNode (DevicePath); } else { Ip = NULL; } + + // + // Skip the optional DNS node + // + if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) && + (DevicePathSubType (DevicePath) == MSG_DNS_DP) + ) { + DevicePath = NextDevicePathNode (DevicePath); + } // // Locate the URI node // if ((DevicePathType (DevicePath) == MESSAGING_DEVICE_PATH) && -- 1.9.5.msysgit.1