[syslinux] pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
Gene Cumm
gene.cumm at gmail.com
Sat Sep 12 15:56:04 PDT 2015
On Sat, Sep 12, 2015 at 6:37 PM, Gene Cumm <gene.cumm at gmail.com> wrote:
> On Sat, Sep 12, 2015 at 10:23 AM, Geert Stappers <stappers at stappers.nl> wrote:
>> Euh, could this be reviewed:
>>
>> diff --git a/core/fs/pxe/dhcp_option.c b/core/fs/pxe/dhcp_option.c
>> index 8d93a6a..b82e944 100644
>> --- a/core/fs/pxe/dhcp_option.c
>> +++ b/core/fs/pxe/dhcp_option.c
>> @@ -143,8 +143,8 @@ static const struct dhcp_options dhcp_opts[] = {
>> {15, local_domain},
>> {43, vendor_encaps},
>> {52, option_overload},
>> - {54, server},
>> {61, client_identifier},
>> + {66, tftpserver_name},
>> {67, bootfile_name},
>> {97, uuid_client_identifier},
>> {209, pxelinux_configfile},
>> @@ -215,7 +215,7 @@ void parse_dhcp_options(const void *option, int size, uint8_t opt_filter)
>> * information is present:
>> *
>> * MyIP - client IP address
>> - * server_ip - boot server IP address
>> + * server_ip - boot server IP address, REVIEW ME FIXME
>> * net_mask - network mask
>> * gate_way - default gateway router IP
>> * boot_file - boot file name
>> @@ -252,4 +252,6 @@ void parse_dhcp(const void *pkt, size_t pkt_len, int pkt_type)
>>
>> if (over_load & 2)
>> parse_dhcp_options(dhcp->sname, 64, 0);
>> +
>> + /* What about option 66, tftserver_name ? FIXME */
>> }
>
> Something like this would be preferable except it's not quite so
> simple. We'd need to not store BOOTP siaddr before parsing. Store a
> pointer to the string during parsing if serverip is unset. After all
> parsing, if the pointer is set, attempt to resolve then set serverip.
> Last, if serverip is not set, copy siaddr to serverip.
Perhaps a more important question is if ANY PXE implementation uses
DHCP option 66 over BOOTP field siaddr.
--
-Gene
More information about the Syslinux
mailing list