Support for PxeBc dhcp functions.\r
\r
Copyright (c) 2013, Red Hat, Inc.\r
-Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
// If the bootfile is not present and bootfilename is present in dhcp packet, just parse it.\r
// And do not count dhcp option header, or else will destroy the serverhostname.\r
//\r
- Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] = (EFI_DHCP4_PACKET_OPTION *) (&Offer->Dhcp4.Header.BootFileName[0] -\r
+ // Make sure "BootFileName" is not overloaded.\r
+ //\r
+ if (Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD] == NULL ||\r
+ (Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD]->Data[0] & PXEBC_DHCP4_OVERLOAD_FILE) == 0) {\r
+ Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] = (EFI_DHCP4_PACKET_OPTION *) (&Offer->Dhcp4.Header.BootFileName[0] -\r
OFFSET_OF (EFI_DHCP4_PACKET_OPTION, Data[0]));\r
-\r
+ }\r
}\r
\r
//\r