[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #20509 [Core Tor/Tor]: Directory authorities should take away Guard flag from relays with #20499 bug



#20509: Directory authorities should take away Guard flag from relays with #20499
bug
-------------------------------------------------+-------------------------
 Reporter:  arma                                 |          Owner:
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.2.9.x-final
Component:  Core Tor/Tor                         |        Version:  Tor:
                                                 |  0.2.8.9
 Severity:  Normal                               |     Resolution:
 Keywords:  028-backport, easy,                  |  Actual Points:
  TorCoreTeam201612, review-group-14             |
Parent ID:                                       |         Points:
 Reviewer:  teor, arma                           |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by rubiate):

 * cc: cb@… (added)


Comment:

 Does this work for the V2Dir flag?

 Diff against last patch:

 {{{
 diff --git a/src/or/dirserv.c b/src/or/dirserv.c
 index 400f04918..5e244e1c4 100644
 --- a/src/or/dirserv.c
 +++ b/src/or/dirserv.c
 @@ -2176,6 +2176,7 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
  {
    const or_options_t *options = get_options();
    uint32_t routerbw_kb = dirserv_get_credible_bandwidth_kb(ri);
 +  int broken_guard = is_broken_guard_version(ri->platform);

    memset(rs, 0, sizeof(routerstatus_t));

 @@ -2192,8 +2193,7 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,

    rs->is_valid = node->is_valid;

 -  if (node->is_fast && node->is_stable &&
 -      !is_broken_guard_version(ri->platform) &&
 +  if (node->is_fast && node->is_stable && !broken_guard &&
        ((options->AuthDirGuardBWGuarantee &&
          routerbw_kb >= options->AuthDirGuardBWGuarantee/1000) ||
         routerbw_kb >= MIN(guard_bandwidth_including_exits_kb,
 @@ -2221,7 +2221,7 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
    strlcpy(rs->nickname, ri->nickname, sizeof(rs->nickname));
    rs->or_port = ri->or_port;
    rs->dir_port = ri->dir_port;
 -  rs->is_v2_dir = ri->supports_tunnelled_dir_requests;
 +  rs->is_v2_dir = ri->supports_tunnelled_dir_requests && !broken_guard;
    if (options->AuthDirHasIPv6Connectivity == 1 &&
        !tor_addr_is_null(&ri->ipv6_addr) &&
        node->last_reachable6 >= now - REACHABLE_TIMEOUT) {
 }}}

 Commits are in branch `ticket20509` at `https://viennan.net/git/tor.git`

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20509#comment:36>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs