aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Masotta <masottaus@yahoo.com>2015-05-25 14:30:30 -0400
committerGene Cumm <gene.cumm@gmail.com>2015-05-26 19:45:10 -0400
commit81eeaa3ea93ef124d4308f622ee29673e534dc0c (patch)
treea69f751c868903227a039b4e73156ac80abd239c
parentb22e1cd76f71536939ae489884f5f332274918a6 (diff)
downloadsyslinux-81eeaa3ea93ef124d4308f622ee29673e534dc0c.tar.gz
syslinux-81eeaa3ea93ef124d4308f622ee29673e534dc0c.tar.xz
syslinux-81eeaa3ea93ef124d4308f622ee29673e534dc0c.zip
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.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/efi/pxe.c b/efi/pxe.c
index 38f0018e..0aa6e19e 100644
--- a/efi/pxe.c
+++ b/efi/pxe.c
@@ -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");
/*