diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-21 14:34:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-09 09:19:42 -0500 |
commit | 0c6eabf08898e0c9f2faa397f2c2bb5fb80b78b9 (patch) | |
tree | 0115299b2405fd12b0f76ab124f8433d91829521 /src/or/dns.c | |
parent | 6045bdd4a0542ef11dc46d98495686172015a961 (diff) | |
download | tor-0c6eabf08898e0c9f2faa397f2c2bb5fb80b78b9.tar.gz tor-0c6eabf08898e0c9f2faa397f2c2bb5fb80b78b9.zip |
Audit all of the "is the network turned off" checks.
DisableNetwork is a subset of net_is_disabled(), which is (now) a
subset of should_delay_dir_fetches().
Some of these changes are redundant with others higher or lower in
the call stack. The ones that I think are behavior-relevant are
listed in the changes file. I've also added comments in a few
places where the behavior is subtle.
Fixes bug 12062; bugfix on various versions.
Diffstat (limited to 'src/or/dns.c')
-rw-r--r-- | src/or/dns.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dns.c b/src/or/dns.c index 078bde3ef2..1de606f8d4 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -1648,7 +1648,7 @@ launch_resolve,(cached_resolve_t *resolve)) tor_addr_t a; int r; - if (get_options()->DisableNetwork) + if (net_is_disabled()) return -1; /* What? Nameservers not configured? Sounds like a bug. */ @@ -1883,7 +1883,7 @@ launch_test_addresses(evutil_socket_t fd, short event, void *args) (void)event; (void)args; - if (options->DisableNetwork) + if (net_is_disabled()) return; log_info(LD_EXIT, "Launching checks to see whether our nameservers like to " |