diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-11-29 17:46:54 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-11-29 17:46:54 -0500 |
commit | 8c5a2c5b804a99155a7822f15fef3feb0e536eaf (patch) | |
tree | 53ebca26c2b709928432f19c8b6cbb286f4443b3 /src/or | |
parent | 116dd4ae4fdf0a4699cafdae39b3cdb88f3512f6 (diff) | |
download | tor-8c5a2c5b804a99155a7822f15fef3feb0e536eaf.tar.gz tor-8c5a2c5b804a99155a7822f15fef3feb0e536eaf.zip |
Make sure we never launch an evdns resolve when DisableNetwork is 1
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/dns.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 8ed9536903..beb110acb2 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -1395,6 +1395,10 @@ launch_resolve(edge_connection_t *exitconn) int r; int options = get_options()->ServerDNSSearchDomains ? 0 : DNS_QUERY_NO_SEARCH; + + if (get_options()->DisableNetwork) + return -1; + /* What? Nameservers not configured? Sounds like a bug. */ if (!nameservers_configured) { log_warn(LD_EXIT, "(Harmless.) Nameservers not configured, but resolve " @@ -1601,6 +1605,9 @@ launch_test_addresses(int fd, short event, void *args) (void)event; (void)args; + if (options->DisableNetwork) + return; + log_info(LD_EXIT, "Launching checks to see whether our nameservers like to " "hijack *everything*."); /* This situation is worse than the failure-hijacking situation. When this |