Sync relay's policy with published descriptor.
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);
Trac:
Username: postman