summaryrefslogtreecommitdiff
path: root/NetworkPkg
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg')
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c11
-rw-r--r--NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h4
2 files changed, 13 insertions, 2 deletions
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
index 540adee311..5bbefcee9d 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c
@@ -98,6 +98,17 @@ PxeBcSelectBootPrompt (
ASSERT (!Mode->UsingIpv6);
VendorOpt = &Cache->Dhcp4.VendorOpt;
+ //
+ // According to the PXE specification 2.1, Table 2-1 PXE DHCP Options,
+ // we must not consider a boot prompt or boot menu if all of the following hold:
+ // - the PXE_DISCOVERY_CONTROL tag(6) is present inside the Vendor Options(43), and has bit 3 set
+ // - a boot file name has been presented in the initial DHCP or ProxyDHCP offer packet.
+ //
+ if (IS_DISABLE_PROMPT_MENU (VendorOpt->DiscoverCtrl) &&
+ Cache->Dhcp4.OptList[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL) {
+ return EFI_ABORTED;
+ }
+
if (!IS_VALID_BOOT_PROMPT (VendorOpt->BitMap)) {
return EFI_TIMEOUT;
}
diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
index 37747ac74f..ee519d9ee2 100644
--- a/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
+++ b/NetworkPkg/UefiPxeBcDxe/PxeBcDhcp4.h
@@ -1,7 +1,7 @@
/** @file
Functions declaration related with DHCPv4 for UefiPxeBc Driver.
- Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2013, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -200,7 +200,7 @@ typedef enum {
#define IS_ENABLE_USE_SERVER_LIST(x) \
(((x) & BIT (2)) == BIT (2))
-#define IS_ENABLE_BOOT_FILE_NAME(x) \
+#define IS_DISABLE_PROMPT_MENU(x) \
(((x) & BIT (3)) == BIT (3))