[tor-commits] [tor/master] Changes file and comment for 25928.
nickm at torproject.org
nickm at torproject.org
Mon Jul 9 14:18:10 UTC 2018
commit 83de46eb2536f17dbe6c96533e8751b5a1ebe984
Author: Nick Mathewson <nickm at torproject.org>
Date: Mon Jul 9 10:16:48 2018 -0400
Changes file and comment for 25928.
---
changes/ticket25928 | 4 ++++
src/feature/nodelist/routerlist.c | 5 ++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/changes/ticket25928 b/changes/ticket25928
new file mode 100644
index 000000000..30759fcb6
--- /dev/null
+++ b/changes/ticket25928
@@ -0,0 +1,4 @@
+ o Minor features (directory):
+ - Improved support for networks with only a single authority or a
+ single fallback directory. Patch from Gabriel Somlo. Closes
+ ticket 25928.
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c
index be58a7a07..12226fee6 100644
--- a/src/feature/nodelist/routerlist.c
+++ b/src/feature/nodelist/routerlist.c
@@ -1806,8 +1806,11 @@ router_pick_dirserver_generic(smartlist_t *sourcelist,
const routerstatus_t *choice;
int busy = 0;
- if (smartlist_len(sourcelist) == 1)
+ if (smartlist_len(sourcelist) == 1) {
+ /* If there's only one choice, then we should disable the logic that
+ * would otherwise prevent us from choosing ourself. */
flags |= PDS_ALLOW_SELF;
+ }
choice = router_pick_trusteddirserver_impl(sourcelist, type, flags, &busy);
if (choice || !(flags & PDS_RETRY_IF_NO_SERVERS))
More information about the tor-commits
mailing list