Gene Cumm
2015-Sep-12 22:56 UTC
[syslinux] pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
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
Geert Stappers
2015-Sep-13 19:46 UTC
[syslinux] pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
On Sat, Sep 12, 2015 at 06:56:04PM -0400, Gene Cumm via Syslinux wrote:> On Sat, Sep 12, 2015 at 6:37 PM, Gene Cumm wrote: > > On Sat, Sep 12, 2015 at 10:23 AM, Geert Stappers wrote: > >> 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 > >> @@ -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.Quoting the spec ( I used http://www.pix.net/software/pxeboot/archive/pxespec.pdf ) sname, 64 bytes, Can be overloaded if using Opt 66 Hope this helps Groeten Geert Stappers -- Leven en laten leven
Gene Cumm
2015-Sep-13 20:10 UTC
[syslinux] pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
On Sun, Sep 13, 2015 at 3:46 PM, Geert Stappers via Syslinux <syslinux at zytor.com> wrote:> On Sat, Sep 12, 2015 at 06:56:04PM -0400, Gene Cumm via Syslinux wrote: >> On Sat, Sep 12, 2015 at 6:37 PM, Gene Cumm wrote: >> > On Sat, Sep 12, 2015 at 10:23 AM, Geert Stappers wrote: >> >> 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 >> >> @@ -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. > > Quoting the spec ( I used http://www.pix.net/software/pxeboot/archive/pxespec.pdf ) > > sname, 64 bytes, Can be overloaded if using Opt 66 > > Hope this helpsI didn't question the specification, where BOOT field sname or DHCP option 66 could be loaded with some string. I questioned if any _implementation_ (ie a PC with PXE OROM) bothers to pay attention to sname/66 before BOOTP field siaddr or if a DHCP daemon would set siaddr to 0 while setting sname/66. If the BOOTP/DHCP specifications require that siaddr be set to the first possible value of sname/66 (which I can't seem to verify with the RFCs), then using siaddr/sname would only serve for fall back if DNS is easier to redirect than DHCP to reconfigure. -- -Gene
Maybe Matching Threads
- pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
- pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
- pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
- pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server
- pxelinux tries to load ldlinux.c32 from DHCP server, instead of next-server