mirror of https://github.com/acidanthera/audk.git
Use siaddr as the PXE server address first and use option 54 when siaddr is NULL.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2571 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
56056c7cd8
commit
9887e0d069
|
@ -1607,14 +1607,19 @@ TryBINL (
|
|||
DhcpRxBuf = &RxBuf[OfferIx];
|
||||
|
||||
//
|
||||
// send DHCP request
|
||||
// if fail return false
|
||||
// use next server address first.
|
||||
//
|
||||
CopyMem (
|
||||
((EFI_IPv4_ADDRESS *) &ServerIp),
|
||||
&((DHCPV4_OP_SERVER_IP *) DhcpRxBuf->OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1])->Ip,
|
||||
sizeof (EFI_IPv4_ADDRESS)
|
||||
);
|
||||
ServerIp.Addr[0] = DhcpRxBuf->u.Dhcpv4.siaddr;
|
||||
if (ServerIp.Addr[0] == 0) {
|
||||
//
|
||||
// next server address is NULL, use option 54.
|
||||
//
|
||||
CopyMem (
|
||||
((EFI_IPv4_ADDRESS *) &ServerIp),
|
||||
&((DHCPV4_OP_SERVER_IP *) DhcpRxBuf->OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1])->Ip,
|
||||
sizeof (EFI_IPv4_ADDRESS)
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// client IP address - filled in by client if it knows it
|
||||
|
|
Loading…
Reference in New Issue