/** @file\r
Functions implementation related with DHCPv4 for UefiPxeBc Driver.\r
\r
- Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
BOOLEAN IsProxyOffer;\r
BOOLEAN IsPxeOffer;\r
UINT8 *Ptr8;\r
+ BOOLEAN FileFieldOverloaded;\r
\r
IsProxyOffer = FALSE;\r
IsPxeOffer = FALSE;\r
+ FileFieldOverloaded = FALSE;\r
\r
ZeroMem (Cache4->OptList, sizeof (Cache4->OptList));\r
ZeroMem (&Cache4->VendorOpt, sizeof (Cache4->VendorOpt));\r
Option = Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD];\r
if (Option != NULL) {\r
if ((Option->Data[0] & PXEBC_DHCP4_OVERLOAD_FILE) != 0) {\r
+ FileFieldOverloaded = TRUE;\r
for (Index = 0; Index < PXEBC_DHCP4_TAG_INDEX_MAX; Index++) {\r
if (Options[Index] == NULL) {\r
Options[Index] = PxeBcParseDhcp4Options (\r
if (*(Ptr8 - 1) != '\0') {\r
*Ptr8 = '\0';\r
}\r
- } else if (Offer->Dhcp4.Header.BootFileName[0] != 0) {\r
+ } else if (!FileFieldOverloaded && Offer->Dhcp4.Header.BootFileName[0] != 0) {\r
//\r
// If the bootfile is not present and bootfilename is present in DHCPv4 packet, just parse it.\r
// Do not count dhcp option header here, or else will destroy the serverhostname.\r