summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-09-09 06:11:37 +0000
committerRoger Dingledine <arma@torproject.org>2005-09-09 06:11:37 +0000
commit42f752a0a5019d1bcf1cb935a4585561fbf268db (patch)
treee33832e5d83365a6e70caeb55451bbd30d6892b9
parenta60345a2c5cdb4770639b310a79f6182c13d826c (diff)
downloadtor-42f752a0a5019d1bcf1cb935a4585561fbf268db.tar.gz
tor-42f752a0a5019d1bcf1cb935a4585561fbf268db.zip
bugfix: we were automatically condemning an exit node (concluding
its advertised exit policy is different from its real one) as soon as it refused any requests. After fixing that bug, another bug appeared: we would try the same server again and again, since once we learned an IP address for a hostname, we still kept think of it as the hostname. now pass it to the remapper before trying to reattach. svn:r4962
-rw-r--r--src/or/relay.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index f2a5904d77..bad68e4846 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -657,13 +657,16 @@ connection_edge_process_end_not_open(
/* check if he *ought* to have allowed it */
if (exitrouter &&
(rh->length < 5 ||
- (!tor_inet_aton(conn->socks_request->address, &in) &&
+ (tor_inet_aton(conn->socks_request->address, &in) &&
!conn->chosen_exit_name))) {
log_fn(LOG_NOTICE,"Exitrouter '%s' seems to be more restrictive than its exit policy. Not using this router as exit for now.", exitrouter->nickname);
addr_policy_free(exitrouter->exit_policy);
exitrouter->exit_policy =
router_parse_addr_policy_from_string("reject *:*", -1);
}
+ /* rewrite it to an IP if we learned one. */
+ addressmap_rewrite(conn->socks_request->address,
+ sizeof(conn->socks_request->address));
if (connection_ap_detach_retriable(conn, circ) >= 0)
return 0;
/* else, conn will get closed below */