[tor-bugs] #18760 [Tor]: I'd like to customize rejection message from dir auths to relay

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Apr 12 23:08:38 UTC 2016


#18760: I'd like to customize rejection message from dir auths to relay
--------------------------+------------------------------
 Reporter:  arma          |          Owner:
     Type:  enhancement   |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.2.???
Component:  Tor           |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:  029-proposed  |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------

Comment (by arma):

 Yuck -- the configuration interface I describe would be easy to do, but
 inside the code, it sure is unprepared for this idea. The code that makes
 the decisions includes stuff like
 {{{
   if (! addr_policy_permits_address(addr, port, authdir_reject_policy))
     return 0;
 }}}
 and our policy linked-lists don't come with {{{const char *reason}}} and
 maybe they shouldn't. In any case, this is no longer a simple patch,
 because of how our current code is shaped.

 So! Here is my much simplified plan:
 {{{
 diff --git a/src/or/dirserv.c b/src/or/dirserv.c
 index ae67e8e..68c7d18 100644
 --- a/src/or/dirserv.c
 +++ b/src/or/dirserv.c
 @@ -367,7 +367,7 @@ dirserv_get_status_impl(const char *id_digest, const
 char *n
      log_fn(severity, LD_DIRSERV, "Rejecting '%s' because of address
 '%s'",
                 nickname, fmt_addr32(addr));
      if (msg)
 -      *msg = "Authdir is rejecting routers in this range.";
 +      *msg = "Suspicious relay address range -- please contact us?";
      return FP_REJECT;
    }
    if (!authdir_policy_valid_address(addr, or_port)) {
 }}}

 is good?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18760#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list