Sourceware Bugzilla – Attachment 4369 Details for
Bug 10851
no fallback to nameserver 0.0.0.0 if /etc/resolv.conf is missing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
New patch
etc-resolv.conf.diff (text/plain), 1.12 KB, created by
Aurelien Jarno
on 2009-11-08 18:41:44 UTC
(
hide
)
Description:
New patch
Filename:
MIME Type:
Creator:
Aurelien Jarno
Created:
2009-11-08 18:41:44 UTC
Size:
1.12 KB
patch
obsolete
>2009-11-08 Aurelien Jarno <aurelien@aurel32.net> > > * resolv/res_init.c (__res_vinit): Initialize nameserver to the > loopback address if none specified. > >--- a/resolv/res_init.c >+++ b/resolv/res_init.c >@@ -176,13 +176,6 @@ __res_vinit(res_state statp, int preinit) { > statp->id = res_randomid(); > } > >-#ifdef USELOOPBACK >- statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); >-#else >- statp->nsaddr.sin_addr.s_addr = INADDR_ANY; >-#endif >- statp->nsaddr.sin_family = AF_INET; >- statp->nsaddr.sin_port = htons(NAMESERVER_PORT); > statp->nscount = 0; > statp->ndots = 1; > statp->pfcode = 0; >@@ -433,6 +426,16 @@ __res_vinit(res_state statp, int preinit) { > #endif > (void) fclose(fp); > } >+ if (statp->nscount == 0) { >+ statp->nscount = 1; >+#ifdef USELOOPBACK >+ statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); >+#else >+ statp->nsaddr.sin_addr.s_addr = INADDR_ANY; >+#endif >+ statp->nsaddr.sin_family = AF_INET; >+ statp->nsaddr.sin_port = htons(NAMESERVER_PORT); >+ } > if (statp->defdname[0] == 0 && > __gethostname(buf, sizeof(statp->defdname) - 1) == 0 && > (cp = strchr(buf, '.')) != NULL) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 10851
:
4322
| 4369 |
4402