Hi, Heyi The patch is good to me, the PXE and HTTP boot driver in NetworkPkg also have similar issue, I think they should be fixed together.
Reviewed-by: Fu Siyuan <[email protected]> > -----Original Message----- > From: edk2-devel [mailto:[email protected]] On Behalf Of > Heyi Guo > Sent: Saturday, April 23, 2016 3:01 PM > To: [email protected] > Cc: Tian, Feng <[email protected]>; chenzhihui > <[email protected]>; Heyi Guo <[email protected]>; Wu, Jiaxin > <[email protected]>; Fu, Siyuan <[email protected]>; Zeng, Star > <[email protected]> > Subject: [edk2] [PATCH] MdeModulePkg/PXE: Ignore BootFileName if it is > overloaded > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: chenzhihui <[email protected]> > Signed-off-by: Heyi Guo <[email protected]> > Cc: Feng Tian <[email protected]> > Cc: Star Zeng <[email protected]> > Cc: Siyuan Fu <[email protected]> > Cc: Jiaxin Wu <[email protected]> > --- > MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c > b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c > index 6c06373..6108be5 100644 > --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c > +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c > @@ -228,9 +228,12 @@ PxeBcParseCachedDhcpPacket ( > // If the bootfile is not present and bootfilename is present in dhcp > packet, > just parse it. > // And do not count dhcp option header, or else will destroy the > serverhostname. > // > - Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] = > (EFI_DHCP4_PACKET_OPTION *) (&Offer->Dhcp4.Header.BootFileName[0] - > + // Make sure "BootFileName" is not overloaded > + if (Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD] == NULL || > + (Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD]->Data[0] & > PXEBC_DHCP4_OVERLOAD_FILE) == 0) { > + Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] = > (EFI_DHCP4_PACKET_OPTION *) (&Offer->Dhcp4.Header.BootFileName[0] - > OFFSET_OF > (EFI_DHCP4_PACKET_OPTION, Data[0])); > - > + } > } > > // > -- > 2.7.0 > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

