mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
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];
|
DhcpRxBuf = &RxBuf[OfferIx];
|
||||||
|
|
||||||
//
|
//
|
||||||
// send DHCP request
|
// use next server address first.
|
||||||
// if fail return false
|
|
||||||
//
|
//
|
||||||
CopyMem (
|
ServerIp.Addr[0] = DhcpRxBuf->u.Dhcpv4.siaddr;
|
||||||
((EFI_IPv4_ADDRESS *) &ServerIp),
|
if (ServerIp.Addr[0] == 0) {
|
||||||
&((DHCPV4_OP_SERVER_IP *) DhcpRxBuf->OpAdds.PktOptAdds[OP_DHCP_SERVER_IP_IX - 1])->Ip,
|
//
|
||||||
sizeof (EFI_IPv4_ADDRESS)
|
// 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
|
// client IP address - filled in by client if it knows it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user