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
commitba4a9cf0c094b7a19e1bf44264b1244a23a4b38e (patch)
treebab81ffaf9bf664f4d699db1c99a67636c445032 /src/or/routerlist.c
parent3030741b5d24e9ae36e6d72c6a8c7d035fde9d2a (diff)
parentf49876d66efbc5679ba7d9d9c6538c763b8e06b5 (diff)
downloadtor-ba4a9cf0c094b7a19e1bf44264b1244a23a4b38e.tar.gz
tor-ba4a9cf0c094b7a19e1bf44264b1244a23a4b38e.zip
Merge branch 'maint-0.2.5' into maint-0.2.8
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 64baf4d709..0c7c5e98f1 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -2536,7 +2536,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,