aboutsummaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-12-19 19:49:03 +0000
committerNick Mathewson <nickm@torproject.org>2006-12-19 19:49:03 +0000
commitbaadf35c639022d81ae906e4c9b14f6c4583ae40 (patch)
tree035c53cd429d46930ba04b88fa20130b7757302b /src/or/dns.c
parentbf6702cf8b8f251356b72a8276fefbdeb6eca453 (diff)
downloadtor-baadf35c639022d81ae906e4c9b14f6c4583ae40.tar.gz
tor-baadf35c639022d81ae906e4c9b14f6c4583ae40.zip
r11646@Kushana: nickm | 2006-12-19 14:40:38 -0500
Resolve bug 363: do not fall back to 127.0.0.1 when no nameservers are configured. Instead, have the admin fix resolv.conf or configure a nameserver. svn:r9157
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index b0e87ac4ed..1369c7da1a 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -1465,8 +1465,11 @@ configure_nameservers(int force)
evdns_clear_nameservers_and_suspend();
}
log_info(LD_EXIT, "Parsing resolver configuration in '%s'", conf_fname);
- if (evdns_resolv_conf_parse(DNS_OPTIONS_ALL, conf_fname))
+ if (evdns_resolv_conf_parse(DNS_OPTIONS_ALL, conf_fname)) {
+ log_warn(LD_EXIT, "Unable to parse '%s', or no nameservers in '%s'",
+ conf_fname, conf_fname);
return -1;
+ }
if (evdns_count_nameservers() == 0) {
log_warn(LD_EXIT, "Unable to find any nameservers in '%s'.", conf_fname);
return -1;