mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Make the NodeFamilies config option work. (Reported by
lodger -- it has never actually worked, even though we added it in Oct 2004.) svn:r10238
This commit is contained in:
@@ -116,6 +116,9 @@ Changes in version 0.2.0.1-alpha - 2007-??-??
|
||||
|
||||
o Minor features (other):
|
||||
- More unit tests.
|
||||
- Make the NodeFamilies config option work. (Reported by
|
||||
lodger -- it has never actually worked, even though we added it
|
||||
in Oct 2004.)
|
||||
|
||||
o Removed features:
|
||||
- Removed support for the old binary "version 0" controller protocol.
|
||||
|
||||
+16
-16
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user