Use siaddr in DHCP packet, if zero, use option 54 instead.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9066 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2009-08-14 02:37:23 +00:00
parent b55f8b0146
commit 2ce5c88a7a
2 changed files with 8 additions and 5 deletions

View File

@ -275,10 +275,11 @@ PxeBcTryBinl (
Offer = &Private->Dhcp4Offers[Index].Packet.Offer;
//
// use option 54, if zero, use siaddr in header
// Use siaddr(next server) in DHCPOFFER packet header, if zero, use option 54(server identifier)
// in DHCPOFFER packet.
// (It does not comply with PXE Spec, Ver2.1)
//
ZeroMem (&ServerIp, sizeof(EFI_IP_ADDRESS));
if (Private->Dhcp4Offers[Index].Dhcp4Option[PXEBC_DHCP4_TAG_INDEX_SERVER_ID] != NULL) {
if (EFI_IP4_EQUAL (&Offer->Dhcp4.Header.ServerAddr.Addr, &mZeroIp4Addr)) {
CopyMem (
&ServerIp.Addr[0],
Private->Dhcp4Offers[Index].Dhcp4Option[PXEBC_DHCP4_TAG_INDEX_SERVER_ID]->Data,

View File

@ -2480,9 +2480,11 @@ DiscoverBootFile (
}
//
// use option 54, if zero, use siaddr in header
// Use siaddr(next server) in DHCPOFFER packet header, if zero, use option 54(server identifier)
// in DHCPOFFER packet.
// (It does not comply with PXE Spec, Ver2.1)
//
if (Packet->Dhcp4Option[PXEBC_DHCP4_TAG_INDEX_SERVER_ID] != NULL) {
if (EFI_IP4_EQUAL (&Packet->Packet.Offer.Dhcp4.Header.ServerAddr, &mZeroIp4Addr)) {
CopyMem (
&Private->ServerIp,
Packet->Dhcp4Option[PXEBC_DHCP4_TAG_INDEX_SERVER_ID]->Data,