summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-30 12:07:59 -0500
committerNick Mathewson <nickm@torproject.org>2017-11-30 12:07:59 -0500
commit5fc0587c040339357bc3fc37f1b5474f1c3d1a33 (patch)
treea8b8d67d703f07590495e659957573f012ac5ec8 /src/or/routerlist.c
parentd459c08b7d5cb1766bda5443ea2750bca160212d (diff)
parent7e2b012b46a4ade2818e47be15d76255cf6f121e (diff)
downloadtor-5fc0587c040339357bc3fc37f1b5474f1c3d1a33.tar.gz
tor-5fc0587c040339357bc3fc37f1b5474f1c3d1a33.zip
Merge branch 'maint-0.2.9' into maint-0.3.0
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index b68db750c3..83e513448d 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2820,7 +2820,10 @@ router_choose_random_node(smartlist_t *excludedsmartlist,
});
}
- if ((r = routerlist_find_my_routerinfo()))
+ /* If the node_t is not found we won't be to exclude ourself but we
+ * won't be able to pick ourself in router_choose_random_node() so
+ * this is fine to at least try with our routerinfo_t object. */
+ if ((r = router_get_my_routerinfo()))
routerlist_add_node_and_family(excludednodes, r);
router_add_running_nodes_to_smartlist(sl, allow_invalid,