Michael Brown
2011-Mar-28 19:53 UTC
[syslinux] [ipxe-devel] Manual IP config does no pass 209:string to chain pxelinux.0
On Friday 25 Mar 2011 21:21:18 Marcus Grando wrote:> >> Script is something like that: > >> > >> #!ipxe > >> ifopen net0 > >> set net0/ip 192.168.0.10 > >> set net0/netmask 255.255.255.0 > >> set net0/gateway 192.168.0.1 > >> set net0/dns 8.8.8.8 > >> set 209:string pxelinux.cfg/default > >> set 210:string http://some_server_elsewere/ > >> chain ${210:string}pxelinux.0 > > pxelinux.0 loads but fail to load menu (pxelinux.cfg/default).The following patch to syslinux for core/fs/pxe/pxe.c (also available at http://git.ipxe.org/people/mcb30/syslinux.git/commitdiff/9126eb2) fixes this problem for me. I am not 100% sure about the error handling in __pxe_searchdir(), so would appreciate some review. Michael commit 9126eb27d1d9597eb8751a5ef75c9bdcf4e429a6 Author: Michael Brown <mcb30 at ipxe.org> Date: Mon Mar 28 20:44:17 2011 +0100 pxe: allow TFTP server IP to be empty when not using TFTP Reported-by: Marcus Grando <Marcus.Grando at corp.terra.com.br> Signed-off-by: Michael Brown <mcb30 at ipxe.org> diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c index aef2e7e..12bbdad 100644 --- a/core/fs/pxe/pxe.c +++ b/core/fs/pxe/pxe.c @@ -754,9 +754,6 @@ static void __pxe_searchdir(const char *filename, struct file *file) break; } - if (!ip) - return; /* No server */ - buf++; /* Point *past* the final NULL */ memcpy(buf, rrq_tail, sizeof rrq_tail); buf += sizeof rrq_tail; @@ -792,6 +789,9 @@ static void __pxe_searchdir(const char *filename, struct file *file) } #endif /* GPXE */ + if (!ip) + goto done; /* No server */ + timeout_ptr = TimeoutTable; /* Reset timeout */ sendreq:
Possibly Parallel Threads
- About cluster size (read/write)
- [PATCH] core: Bad read of file size over TFTP
- Strange problems (deadlock) in ocfs2 (rpm 1.2.4-2 and svn 2982) - dlm related?
- Problem after upgrade to 1.4.7-1 (Bad magic number in superblock while opening context for device)
- gPXE+pxelinux fails with static network config