mirror of
https://github.com/ipxe/ipxe
synced 2026-01-26 01:15:54 +03:00
Abort immediately if no nameserver is present.
This commit is contained in:
@@ -249,6 +249,12 @@ static int dns_resolv ( struct in_addr *addr, const char *name ) {
|
||||
unsigned int recursion = 0;
|
||||
unsigned int id = 1;
|
||||
|
||||
/* Fail immediately if we have no name server */
|
||||
if ( ! arptable[ARP_NAMESERVER].ipaddr.s_addr ) {
|
||||
DBG ( "DNS has no nameserver\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
DBG ( "DNS resolving %s\n", name );
|
||||
|
||||
/* Set up the query data */
|
||||
|
||||
Reference in New Issue
Block a user