backport candidate:

The "ClientDNSRejectInternalAddresses" config option wasn't being
consistently obeyed: if an exit relay refuses a stream because its
exit policy doesn't allow it, we would remember what IP address
the relay said the destination address resolves to, even if it's
an internal IP address. Bugfix on 0.2.0.7-alpha; patch by rovv.


svn:r17135
This commit is contained in:
Roger Dingledine
2008-10-17 22:08:49 +00:00
parent e3127e874e
commit bca46cc628
2 changed files with 13 additions and 3 deletions
+5 -2
View File
@@ -630,8 +630,11 @@ connection_edge_process_end_not_open(
ttl = (int)ntohl(get_uint32(cell->payload+RELAY_HEADER_SIZE+5));
else
ttl = -1;
client_dns_set_addressmap(conn->socks_request->address, addr,
conn->chosen_exit_name, ttl);
if (!(get_options()->ClientDNSRejectInternalAddresses &&
is_internal_IP(addr, 0)))
client_dns_set_addressmap(conn->socks_request->address, addr,
conn->chosen_exit_name, ttl);
}
/* check if he *ought* to have allowed it */
if (exitrouter &&