mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Small change to non-blocking DNS initialization.
The trailing dot on "localhost." circumvents use of /etc/hosts in some environments (I saw it on FreeBSD 9.0-RELEASE-p3) and so emits an actual DNS query. When running the test suite, that would be hundreds of useless queries.
This commit is contained in:
parent
f6c9b69eda
commit
67d01ab9e9
1 changed files with 1 additions and 1 deletions
|
@ -124,7 +124,7 @@ nb_dns_init(char *errstr)
|
||||||
nd->s = -1;
|
nd->s = -1;
|
||||||
|
|
||||||
/* XXX should be able to init static hostent struct some other way */
|
/* XXX should be able to init static hostent struct some other way */
|
||||||
(void)gethostbyname("localhost.");
|
(void)gethostbyname("localhost");
|
||||||
|
|
||||||
if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
|
if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
|
||||||
snprintf(errstr, NB_DNS_ERRSIZE, "res_init() failed");
|
snprintf(errstr, NB_DNS_ERRSIZE, "res_init() failed");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue