From f5ae4d99753d6c25fe5c529dd8a5beb5f3835238 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 29 Jun 2007 12:37:41 -0400 Subject: [PATCH] PXELINUX: if siaddr isn't set, fall back to server identity If the siaddr field in the DHCP header isn't set, fall back to the server identity option. This seems to match the behaviour of the PXE stacks, and some (braindead) DHCP servers don't allow the server identity to be set. --- NEWS | 6 +++++- pxelinux.asm | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1b606c1..ef79119 100644 --- a/NEWS +++ b/NEWS @@ -6,9 +6,13 @@ Changes in 3.52: * Handle capitalized F-key commands in the menu system. * Fix padding error when loading multiple ramdisks. * Workaround for VMware crashing when trying to print a - message during early kernel boot. + message during early kernel boot (does not seem to work, + consider deleting.) * chain.c32: add the ability to search for a specific MBR signature at runtime. + * Fall back to the server identity option if the siaddr field + in the DHCP header isn't set. This seems to match the + behaviour of most PXE stacks. Changes in 3.51: * EXTLINUX: Fix failure to find the configuration file. diff --git a/pxelinux.asm b/pxelinux.asm index b90a48b..800c66d 100644 --- a/pxelinux.asm +++ b/pxelinux.asm @@ -2236,6 +2236,15 @@ dopt_%2: mov [OverLoad],bl ret + dopt 54, server + mov eax,[si] + cmp dword [ServerIP],0 + jne .skip ; Already have a next server IP + cmp al,224 ; Class D or higher + jae .skip + mov [ServerIP],eax +.skip: ret + dopt 61, client_identifier cmp ax,MAC_MAX ; Too long? ja .skip -- 2.7.4