summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-02-11 00:06:32 -0500
committerRich Felker <dalias@aerifal.cx>2012-02-11 00:06:32 -0500
commit88d84b7cc85841c575e54b635b125012c1d2e39d (patch)
tree4c3a85d011154db67cc8b250dfee746067bccb27
parentf42bad9ccb2af7cde8a676d57c4d161455256456 (diff)
downloadmusl-88d84b7cc85841c575e54b635b125012c1d2e39d.tar.gz
musl-88d84b7cc85841c575e54b635b125012c1d2e39d.tar.bz2
musl-88d84b7cc85841c575e54b635b125012c1d2e39d.tar.xz
musl-88d84b7cc85841c575e54b635b125012c1d2e39d.zip
fix default nameserver when resolv.conf doesn't exist
-rw-r--r--src/network/__dns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/__dns.c b/src/network/__dns.c
index 45d9b438..0d4f47e0 100644
--- a/src/network/__dns.c
+++ b/src/network/__dns.c
@@ -82,8 +82,9 @@ int __dns_doqueries(unsigned char *dest, const char *name, int *rr, int rrcnt)
}
if (f) __fclose_ca(f);
if (!nns) {
- ns[0].sin.sin_family = AF_INET;
+ ns[0].sin.sin_family = family = AF_INET;
ns[0].sin.sin_port = htons(53);
+ ns[0].sin.sin_addr.s_addr = htonl(0x7f000001);
nns=1;
sl = sizeof sa.sin;
}