From 64a0c6073b46a09ecbc429442d966a2d3bdc1c67 Mon Sep 17 00:00:00 2001 From: Bryce Lanham Date: Sat, 22 Apr 2023 01:22:36 -0500 Subject: [PATCH] Fix PXE BIOS boot when using a proxy DHCP server --- common/pxe/pxe.h | 1 + common/pxe/tftp.s2.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/pxe/pxe.h b/common/pxe/pxe.h index bbb9d087..e80c7150 100644 --- a/common/pxe/pxe.h +++ b/common/pxe/pxe.h @@ -88,6 +88,7 @@ struct bangpxe { } __attribute__((packed)); #define PXENV_GET_CACHED_INFO 0x0071 +#define PXENV_PACKET_TYPE_CACHED_REPLY 3 struct pxenv_get_cached_info { uint16_t status; uint16_t packet_type; diff --git a/common/pxe/tftp.s2.c b/common/pxe/tftp.s2.c index 7fdc9829..db32b5d6 100644 --- a/common/pxe/tftp.s2.c +++ b/common/pxe/tftp.s2.c @@ -14,7 +14,7 @@ static uint32_t get_boot_server_info(void) { struct pxenv_get_cached_info cachedinfo = { 0 }; - cachedinfo.packet_type = 2; + cachedinfo.packet_type = PXENV_PACKET_TYPE_CACHED_REPLY; pxe_call(PXENV_GET_CACHED_INFO, ((uint16_t)rm_seg(&cachedinfo)), (uint16_t)rm_off(&cachedinfo)); struct bootph *ph = (struct bootph*)(void *) (((((uint32_t)cachedinfo.buffer) >> 16) << 4) + (((uint32_t)cachedinfo.buffer) & 0xFFFF)); return ph->sip;