[tor-bugs] #9801 [Tor]: options_act thinks options have changed that haven't

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed May 28 16:59:02 UTC 2014


#9801: options_act thinks options have changed that haven't
-----------------------------+------------------------------
     Reporter:  cypherpunks  |      Owner:
         Type:  defect       |     Status:  needs_review
     Priority:  normal       |  Milestone:  Tor: 0.2.???
    Component:  Tor          |    Version:  Tor: 0.2.4.17-rc
   Resolution:               |   Keywords:  tor-client
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+------------------------------
Changes (by qwerty1):

 * status:  needs_information => needs_review


Comment:

 {{{
 --- src/or/config.c
 +++ src/or/config.c
 @@ -1592,20 +1592,6 @@
      return -1;
    }

 -  config_maybe_load_geoip_files_(options, old_options);
 -
 -  if (geoip_is_loaded(AF_INET) && options->GeoIPExcludeUnknown) {
 -    /* ExcludeUnknown is true or "auto" */
 -    const int is_auto = options->GeoIPExcludeUnknown == -1;
 -    int changed;
 -
 -    changed  = routerset_add_unknown_ccs(&options->ExcludeNodes,
 is_auto);
 -    changed += routerset_add_unknown_ccs(&options->ExcludeExitNodes,
 is_auto);
 -
 -    if (changed)
 -      routerset_add_unknown_ccs(&options->ExcludeExitNodesUnion_,
 is_auto);
 -  }
 -
    /* Check for transitions that need action. */
    if (old_options) {
      int revise_trackexithosts = 0;
 @@ -1701,6 +1687,20 @@
        connection_or_update_token_buckets(get_connection_array(),
 options);
    }

 +  config_maybe_load_geoip_files_(options, old_options);
 +
 +  if (geoip_is_loaded(AF_INET) && options->GeoIPExcludeUnknown) {
 +    /* ExcludeUnknown is true or "auto" */
 +    const int is_auto = options->GeoIPExcludeUnknown == -1;
 +    int changed;
 +
 +    changed  = routerset_add_unknown_ccs(&options->ExcludeNodes,
 is_auto);
 +    changed += routerset_add_unknown_ccs(&options->ExcludeExitNodes,
 is_auto);
 +
 +    if (changed)
 +      routerset_add_unknown_ccs(&options->ExcludeExitNodesUnion_,
 is_auto);
 +  }
 +
    if (options->CellStatistics || options->DirReqStatistics ||
        options->EntryStatistics || options->ExitPortStatistics ||
        options->ConnDirectionStatistics ||
 }}}

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


More information about the tor-bugs mailing list