[syslinux] Support DHCP sname field in PXELINUX

H. Peter Anvin hpa at zytor.com
Thu Jun 28 12:53:39 PDT 2007


Chris Adams wrote:
> Once upon a time, H. Peter Anvin <hpa at zytor.com> said:
>> Chris Adams wrote:
>>> I have discovered that the JUNOS DHCP server in Juniper J-series routers
>>> doesn't support setting the next-server IP address field (I have filed a
>>> bug report with Juniper and they are working on it).  Instead, it puts
>>> the "boot server" in the sname field, which PXELINUX currently ignores.
>>>
>>> Here's a simple patch (vs. 3.36) that will take an IP string in the
>>> field.  My assembly is pretty rusty, and I couldn't quite figure out how
>>> to use the DNS resolver, so it doesn't handle a hostname.  This does
>>> work for me with an IP string.
>> You have no guarantee that sname is an IP string; in fact, in the 
>> typical case it will not be.
>>
>> I don't think this patch is safe.
> 
> Well, it doesn't try to parse a null string, and it only saves the
> resulting IP if parse_dotquad says it succeeded.  How can that not be
> safe?

Hm.  I guess the Right Thing is too parse this as a DNS name or IP 
address if and only if siaddr is zero.  There is no way to get the 
source address of the DHCP reply from the PXE stack, so the ultimate 
fallback is not available.

	-hpa




More information about the Syslinux mailing list