diff options
author | Patrick Masotta <masottaus@yahoo.com> | 2015-05-25 14:30:30 -0400 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2015-05-26 19:45:10 -0400 |
commit | 81eeaa3ea93ef124d4308f622ee29673e534dc0c (patch) | |
tree | a69f751c868903227a039b4e73156ac80abd239c | |
parent | b22e1cd76f71536939ae489884f5f332274918a6 (diff) | |
download | syslinux-81eeaa3ea93ef124d4308f622ee29673e534dc0c.tar.gz |
efi/pxe: Use the appropriate 3rd packet
EFI allows us to have access to more DHCP-related packets. Choose the
packet with the highest priority for the third to parse.
Signed-off-by: Patrick Masotta <masottaus@yahoo.com>
[gene.cumm@gmail.com: Only change the third parsing iteration;
reflow to better fit code standards; don't reparse DhcpAck]
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r-- | efi/pxe.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -154,7 +154,15 @@ void net_parse_dhcp(void) * Get the boot file and other info. This lives in the CACHED_REPLY * packet (BIOS/PXE query info 3) */ - parse_dhcp(&mode->PxeReply.Dhcpv4, pkt_len); + EFI_PXE_BASE_CODE_DHCPV4_PACKET* pkt_v4 = NULL; + + if (mode->PxeReplyReceived) + pkt_v4 = &mode->PxeReply.Dhcpv4; + else if (mode->ProxyOfferReceived) + pkt_v4 = &mode->ProxyOffer.Dhcpv4; + + if (pkt_v4) + parse_dhcp(pkt_v4, pkt_len); Print(L"\n"); /* |