Line
Link Here
|
0 |
-- a/resolv/res_init.c |
0 |
++ b/resolv/res_init.c |
Lines 176-188
__res_vinit(res_state statp, int preinit) {
Link Here
|
176 |
statp->id = res_randomid(); |
176 |
statp->id = res_randomid(); |
177 |
} |
177 |
} |
178 |
|
178 |
|
179 |
#ifdef USELOOPBACK |
|
|
180 |
statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); |
181 |
#else |
182 |
statp->nsaddr.sin_addr.s_addr = INADDR_ANY; |
183 |
#endif |
184 |
statp->nsaddr.sin_family = AF_INET; |
185 |
statp->nsaddr.sin_port = htons(NAMESERVER_PORT); |
186 |
statp->nscount = 0; |
179 |
statp->nscount = 0; |
187 |
statp->ndots = 1; |
180 |
statp->ndots = 1; |
188 |
statp->pfcode = 0; |
181 |
statp->pfcode = 0; |
Lines 433-438
__res_vinit(res_state statp, int preinit) {
Link Here
|
433 |
#endif |
426 |
#endif |
434 |
(void) fclose(fp); |
427 |
(void) fclose(fp); |
435 |
} |
428 |
} |
|
|
429 |
if (statp->nscount == 0) { |
430 |
statp->nscount = 1; |
431 |
#ifdef USELOOPBACK |
432 |
statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); |
433 |
#else |
434 |
statp->nsaddr.sin_addr.s_addr = INADDR_ANY; |
435 |
#endif |
436 |
statp->nsaddr.sin_family = AF_INET; |
437 |
statp->nsaddr.sin_port = htons(NAMESERVER_PORT); |
438 |
} |
436 |
if (statp->defdname[0] == 0 && |
439 |
if (statp->defdname[0] == 0 && |
437 |
__gethostname(buf, sizeof(statp->defdname) - 1) == 0 && |
440 |
__gethostname(buf, sizeof(statp->defdname) - 1) == 0 && |
438 |
(cp = strchr(buf, '.')) != NULL) |
441 |
(cp = strchr(buf, '.')) != NULL) |