diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-07 10:03:31 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-07 10:03:31 -0400 |
commit | 27fa4a98d23972213122fa99499efa4baebe49e3 (patch) | |
tree | f11c4da24093f55133d2ecc0b9aa73f66979bf60 /src/or/relay.c | |
parent | 8421756da3fc3cc116d17fe96b50384c0d79af8b (diff) | |
download | tor-27fa4a98d23972213122fa99499efa4baebe49e3.tar.gz tor-27fa4a98d23972213122fa99499efa4baebe49e3.zip |
Make ClientDNSRejectInternalAddresses testing-only.
Undeprecate it;
rename it to TestingClientDNSRejectInternalAddresses;
add the old name as an alias;
reject configurations where it is set but TestingTorNetwork is not;
change the documentation accordingly.
Closes tickets 21031 and 21522.
Diffstat (limited to 'src/or/relay.c')
-rw-r--r-- | src/or/relay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/relay.c b/src/or/relay.c index ba9c09b843..c00afc8e72 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -930,7 +930,7 @@ connection_ap_process_end_not_open( connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL); return 0; } - if (get_options()->ClientDNSRejectInternalAddresses && + if (get_options()->TestingClientDNSRejectInternalAddresses && tor_addr_is_internal(&addr, 0)) { log_info(LD_APP,"Address '%s' resolved to internal. Closing,", safe_str(conn->socks_request->address)); @@ -1347,7 +1347,7 @@ connection_edge_process_resolved_cell(edge_connection_t *conn, goto done; } - if (get_options()->ClientDNSRejectInternalAddresses) { + if (get_options()->TestingClientDNSRejectInternalAddresses) { int orig_len = smartlist_len(resolved_addresses); SMARTLIST_FOREACH_BEGIN(resolved_addresses, address_ttl_t *, addr) { if (addr->hostname == NULL && tor_addr_is_internal(&addr->addr, 0)) { @@ -1440,7 +1440,7 @@ connection_edge_process_relay_cell_not_open( if (tor_addr_family(&addr) != AF_UNSPEC) { const sa_family_t family = tor_addr_family(&addr); if (tor_addr_is_null(&addr) || - (get_options()->ClientDNSRejectInternalAddresses && + (get_options()->TestingClientDNSRejectInternalAddresses && tor_addr_is_internal(&addr, 0))) { log_info(LD_APP, "...but it claims the IP address was %s. Closing.", fmt_addr(&addr)); |