Browse Source

Abort immediately if no nameserver is present.

tags/v0.9.3
Michael Brown 19 years ago
parent
commit
0cfcd91558
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/proto/dns.c

+ 6
- 0
src/proto/dns.c View File

249
 	unsigned int recursion = 0;
249
 	unsigned int recursion = 0;
250
 	unsigned int id = 1;
250
 	unsigned int id = 1;
251
 
251
 
252
+	/* Fail immediately if we have no name server */
253
+	if ( ! arptable[ARP_NAMESERVER].ipaddr.s_addr ) {
254
+		DBG ( "DNS has no nameserver\n" );
255
+		return 0;
256
+	}
257
+
252
 	DBG ( "DNS resolving %s\n", name );
258
 	DBG ( "DNS resolving %s\n", name );
253
 
259
 
254
 	/* Set up the query data */
260
 	/* Set up the query data */

Loading…
Cancel
Save