[tor-bugs] #20830 [Core Tor/Tor]: Remove legacy guard algorithm code

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jan 24 11:39:19 UTC 2017


#20830: Remove legacy guard algorithm code
--------------------------+------------------------------------
 Reporter:  nickm         |          Owner:  nickm
     Type:  task          |         Status:  needs_review
 Priority:  Medium        |      Milestone:  Tor: 0.3.0.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:  tor-guard     |  Actual Points:
Parent ID:  #20822        |         Points:  .5
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by asn):

 LGTM!

 Please check my branch `remove_legacy_guards` for some more code
 deletions. I deleted three pieces of code which did:
 {{{
      SMARTLIST_FOREACH_BEGIN(guard_contexts, guard_selection_t *, gs) {
 -      if (!strcmp(gs->name, "legacy"))
 -        continue;
 }}}

 Reading the code it should not be possible to instantiate a 'legacy'
 guard_selection_t anymore, so there is no point in checking for it, right?

 Now the only part that mentions 'legacy' in entrynodes.c is:
 {{{
     if (!strcmp(guard->selection_name, "legacy")) {
       ++n_errors;
       entry_guard_free(guard);
       continue;
     }
 }}}
 I think we might need to keep this there in case someone still has
 'legacy' guards in their state file.

 Check my branch and feel free to move this to `merge_ready`.

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


More information about the tor-bugs mailing list