diff options
author | Liu Aleaxander <Aleaxander@gmail.com> | 2009-08-28 19:26:04 +0800 |
---|---|---|
committer | Liu Aleaxander <Aleaxander@gmail.com> | 2009-08-28 19:26:04 +0800 |
commit | 284ae5d0427e59def2210ecfc262965ade767337 (patch) | |
tree | 9645af79a5ac2800bf385f24ec5266619031de55 | |
parent | ad49e6d67851b450a8b2b30f8d8042af2082d9ba (diff) | |
download | syslinux-284ae5d0427e59def2210ecfc262965ade767337.tar.gz |
Core:pxelinux: fix the probaly hang when use host
We shoud check the server if vaild or not; if not, move no until we run out
the time.
Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
-rw-r--r-- | core/fs/pxe/dnsresolv.c | 2 | ||||
-rw-r--r-- | core/fs/pxe/pxe.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/core/fs/pxe/dnsresolv.c b/core/fs/pxe/dnsresolv.c index b2c36b7f..70e00c67 100644 --- a/core/fs/pxe/dnsresolv.c +++ b/core/fs/pxe/dnsresolv.c @@ -217,6 +217,8 @@ uint32_t dns_resolv(const char *name) timeout = *timeout_ptr++; while (srv_ptr < dns_server + DNS_MAX_SERVERS) { srv = *srv_ptr++; + if (!srv) + continue; /* just move on before runing the time out */ uw_pkt.status = 0; uw_pkt.sip = srv; uw_pkt.gip = ((srv ^ MyIP) & Netmask) ? Gateway : 0; diff --git a/core/fs/pxe/pxe.h b/core/fs/pxe/pxe.h index a775f26c..86bf92f7 100644 --- a/core/fs/pxe/pxe.h +++ b/core/fs/pxe/pxe.h @@ -230,7 +230,7 @@ void parse_dhcp_options(void *, int, int); /* dnsresolv.c */ int dns_mangle(char **, const char *); -uint32_t dns_resolv(char *); +uint32_t dns_resolv(const char *); #endif /* pxe.h */ |