aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--pxelinux.asm20
2 files changed, 23 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 4c029c36..d80099e0 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,9 @@ Changes in 2.07:
* MEMDISK: Fix bug that would occationally cause "ran out of
input data" when using compressed disk images.
* SYSLINUX: Updates for the win32 installer (from Lars Munch.)
+ * PXELINUX: PXELINUX-specific options are now recognized both
+ in a vendor-option-space (a.k.a. type 43 encapsulated) as
+ well as in a site-option-space (unencapsulated.)
Changes in 2.06:
* ALL: Fix problem that would occationally cause a
diff --git a/pxelinux.asm b/pxelinux.asm
index fd0d62cc..802118b4 100644
--- a/pxelinux.asm
+++ b/pxelinux.asm
@@ -2116,7 +2116,14 @@ parse_dhcp:
; size is CX -- some DHCP servers leave option fields unterminated
; in violation of the spec.
;
+; For parse_some_dhcp_options, DH contains the minimum value for
+; the option to recognize -- this is used to restrict parsing to
+; PXELINUX-specific options only.
+;
parse_dhcp_options:
+ xor dx,dx
+
+parse_some_dhcp_options:
.loop:
and cx,cx
jz .done
@@ -2137,6 +2144,9 @@ parse_dhcp_options:
sub cx,ax ; Decrement bytes left counter
jb .done ; Malformed option: length > field size
+ cmp dl,dh ; Is the option value
+ jb .opt_done
+
cmp dl,1 ; SUBNET MASK option
jne .not_subnet
mov edx,[si]
@@ -2151,6 +2161,16 @@ parse_dhcp_options:
jmp .opt_done
.not_router:
+ cmp dl,43 ; VENDOR ENCAPSULATED option
+ jne .not_vendor
+ pusha
+ mov dh,208 ; Only recognize PXELINUX options
+ mov cx,ax ; Length of option = max bytes to parse
+ call parse_some_dhcp_options ; Parse recursive structure
+ popa
+ jmp .opt_done
+.not_vendor:
+
cmp dl,52 ; OPTION OVERLOAD option
jne .not_overload
mov dl,[si]