Merge pull request #265 from blanham/fix_pxe_proxy_boot

Fix PXE BIOS boot when using a proxy DHCP server
This commit is contained in:
ミンツキ 2023-04-22 10:37:23 +02:00 committed by GitHub
commit 2a26d90394
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -88,6 +88,7 @@ struct bangpxe {
} __attribute__((packed)); } __attribute__((packed));
#define PXENV_GET_CACHED_INFO 0x0071 #define PXENV_GET_CACHED_INFO 0x0071
#define PXENV_PACKET_TYPE_CACHED_REPLY 3
struct pxenv_get_cached_info { struct pxenv_get_cached_info {
uint16_t status; uint16_t status;
uint16_t packet_type; uint16_t packet_type;

View File

@ -14,7 +14,7 @@
static uint32_t get_boot_server_info(void) { static uint32_t get_boot_server_info(void) {
struct pxenv_get_cached_info cachedinfo = { 0 }; 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)); 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)); struct bootph *ph = (struct bootph*)(void *) (((((uint32_t)cachedinfo.buffer) >> 16) << 4) + (((uint32_t)cachedinfo.buffer) & 0xFFFF));
return ph->sip; return ph->sip;