[tor-bugs] #2366 [Tor Relay]: Sync relay's policy with published descriptor.
Tor Bug Tracker & Wiki
torproject-admin at torproject.org
Sun Jan 9 15:19:09 UTC 2011
#2366: Sync relay's policy with published descriptor.
---------------------+------------------------------------------------------
Reporter: postman | Type: defect
Status: new | Priority: normal
Milestone: | Component: Tor Relay
Version: | Keywords: dns reject policy
Parent: |
---------------------+------------------------------------------------------
If DNS is screwed up then an exit relay don't claim to be an exit. So it
publishes descriptor with "reject star" policy. While it still behave like
exit, it fetches extra stuff and etc. Relay's policy need to be synced
with stuff used by clients.
{{{
--- router.c.origin Mon Jan 3 22:25:30 2011
+++ router.c Sun Jan 9 14:52:34 2011
@@ -1414,6 +1414,14 @@
policies_parse_exit_policy(options->ExitPolicy, &ri->exit_policy,
options->ExitPolicyRejectPrivate,
ri->address, !options->BridgeRelay);
+
+ if (dns_seems_to_be_broken() || has_dns_init_failed()) {
+ addr_policy_list_free(ri->exit_policy);
+ ri->exit_policy = NULL; /* empty */
+ policies_parse_exit_policy(NULL, &ri->exit_policy, 0, NULL, 0);
+ if (!ri->exit_policy || !policy_is_reject_star(ri->exit_policy))
+ log_warn(LD_BUG, "Unable to produce reject star policy");
+ }
ri->policy_is_reject_star =
policy_is_reject_star(ri->exit_policy);
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/2366>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list