summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-06-29 12:37:41 -0400
committerH. Peter Anvin <hpa@zytor.com>2007-06-29 12:37:41 -0400
commitf5ae4d99753d6c25fe5c529dd8a5beb5f3835238 (patch)
tree8df195cc2eef8c6a63be3957ed612e507d2ba2bb
parentc15e6adb92140b3050d4b9bb1ccd5c7a1c392c67 (diff)
downloadsyslinux-f5ae4d99753d6c25fe5c529dd8a5beb5f3835238.tar.gz
PXELINUX: if siaddr isn't set, fall back to server identitysyslinux-3.52-pre2
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.
-rw-r--r--NEWS6
-rw-r--r--pxelinux.asm9
2 files changed, 14 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 1b606c1f..ef791198 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 b90a48b1..800c66d5 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