]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'feature18483-028-v2-squashed' into maint-0.2.8
authorNick Mathewson <nickm@torproject.org>
Thu, 5 May 2016 12:16:36 +0000 (08:16 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 5 May 2016 12:16:36 +0000 (08:16 -0400)
1  2 
src/or/routerlist.c

index 2167ae2bf6bc6084db721e4d9780541aebcbdd9e,6a293b7ccb904221fe74cc178cc8abdd87587850..97512d7969f70ebed6f540c21d8cab6e563eebfd
@@@ -1743,11 -1746,13 +1744,11 @@@ router_pick_directory_server_impl(dirin
                                     try_ip_pref))
        smartlist_add(is_trusted ? trusted_tunnel :
                      is_overloaded ? overloaded_tunnel : tunnel, (void*)node);
-     else if (skip_dir ||
+     else if (!must_have_or && (skip_dir ||
               fascist_firewall_allows_rs(status, FIREWALL_DIR_CONNECTION,
-                                         try_ip_pref))
+                                         try_ip_pref)))
        smartlist_add(is_trusted ? trusted_direct :
                      is_overloaded ? overloaded_direct : direct, (void*)node);
 -    else if (!tor_addr_is_null(&status->ipv6_addr))
 -      ++n_not_preferred;
    } SMARTLIST_FOREACH_END(node);
  
    if (smartlist_len(tunnel)) {
@@@ -1888,10 -1894,12 +1890,10 @@@ router_pick_trusteddirserver_impl(cons
            fascist_firewall_allows_dir_server(d, FIREWALL_OR_CONNECTION,
                                               try_ip_pref))
          smartlist_add(is_overloaded ? overloaded_tunnel : tunnel, (void*)d);
-       else if (skip_dir ||
+       else if (!must_have_or && (skip_dir ||
                 fascist_firewall_allows_dir_server(d, FIREWALL_DIR_CONNECTION,
-                                                   try_ip_pref))
+                                                   try_ip_pref)))
          smartlist_add(is_overloaded ? overloaded_direct : direct, (void*)d);
 -      else if (!tor_addr_is_null(&d->ipv6_addr))
 -        ++n_not_preferred;
      }
    SMARTLIST_FOREACH_END(d);