diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/routerlist.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index f85dfb97cc..2b900af2e9 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -823,23 +823,23 @@ routerlist_add_family(smartlist_t *sl, routerinfo_t *router) if (options->EnforceDistinctSubnets) routerlist_add_network_family(sl, router); - if (!router->declared_family) - return; - /* Add every r such that router declares familyness with r, and r - * declares familyhood with router. */ - SMARTLIST_FOREACH(router->declared_family, const char *, n, - { - if (!(r = router_get_by_nickname(n, 0))) - continue; - if (!r->declared_family) - continue; - SMARTLIST_FOREACH(r->declared_family, const char *, n2, - { - if (router_nickname_matches(router, n2)) - smartlist_add(sl, r); - }); - }); + if (router->declared_family) { + /* Add every r such that router declares familyness with r, and r + * declares familyhood with router. */ + SMARTLIST_FOREACH(router->declared_family, const char *, n, + { + if (!(r = router_get_by_nickname(n, 0))) + continue; + if (!r->declared_family) + continue; + SMARTLIST_FOREACH(r->declared_family, const char *, n2, + { + if (router_nickname_matches(router, n2)) + smartlist_add(sl, r); + }); + }); + } /* If the user declared any families locally, honor those too. */ for (cl = get_options()->NodeFamilies; cl; cl = cl->next) { |