aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Masotta <masottaus@yahoo.com>2015-06-09 05:49:48 -0400
committerGene Cumm <gene.cumm@gmail.com>2015-06-09 05:50:15 -0400
commit8a00e49608ff73a18ef6269a828bf5be96a1cfe3 (patch)
treedc789db19b86497f4d7aa1fb85038681b7c6f049
parent81eeaa3ea93ef124d4308f622ee29673e534dc0c (diff)
downloadsyslinux-8a00e49608ff73a18ef6269a828bf5be96a1cfe3.tar.gz
efi/pxe: save MAC after parsing last packet
parse_dhcp() does this also, seeming to set a bad value for some clients. Fixes some deaf clients. Signed-off-by: Patrick Masotta <masottaus@yahoo.com> [gene.cumm@gmail.com: Just move existing code] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r--efi/pxe.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/efi/pxe.c b/efi/pxe.c
index 0aa6e19e..7b3f9a0d 100644
--- a/efi/pxe.c
+++ b/efi/pxe.c
@@ -140,15 +140,6 @@ void net_parse_dhcp(void)
* address). This lives in the DHCPACK packet (BIOS/PXE query info 2)
*/
parse_dhcp(&mode->DhcpAck.Dhcpv4, pkt_len);
- /*
- * Save away MAC address (assume this is in query info 2. If this
- * turns out to be problematic it might be better getting it from
- * the query info 1 packet
- */
- hardlen = mode->DhcpAck.Dhcpv4.BootpHwAddrLen;
- MAC_len = hardlen > 16 ? 0 : hardlen;
- MAC_type = mode->DhcpAck.Dhcpv4.BootpHwType;
- memcpy(MAC, mode->DhcpAck.Dhcpv4.BootpHwAddr, MAC_len);
/*
* Get the boot file and other info. This lives in the CACHED_REPLY
@@ -163,6 +154,17 @@ void net_parse_dhcp(void)
if (pkt_v4)
parse_dhcp(pkt_v4, pkt_len);
+
+ /*
+ * Save away MAC address (assume this is in query info 2. If this
+ * turns out to be problematic it might be better getting it from
+ * the query info 1 packet
+ */
+ hardlen = mode->DhcpAck.Dhcpv4.BootpHwAddrLen;
+ MAC_len = hardlen > 16 ? 0 : hardlen;
+ MAC_type = mode->DhcpAck.Dhcpv4.BootpHwType;
+ memcpy(MAC, mode->DhcpAck.Dhcpv4.BootpHwAddr, MAC_len);
+
Print(L"\n");
/*