commit 9ef2cd7776ecb91b74c1db58d8fbd9111238f458 Merge: 7ca16af 2bf0e74 Author: Nick Mathewson nickm@torproject.org Date: Tue Sep 6 20:55:31 2011 -0400
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts: src/or/connection_edge.c
Conflicted on a router->node transition; fix was easy.
changes/bug3923 | 5 +++++ src/or/connection_edge.c | 10 ++++------ 2 files changed, 9 insertions(+), 6 deletions(-)
diff --cc src/or/connection_edge.c index 72c4224,8609b02..7028764 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@@ -930,17 -842,15 +930,15 @@@ addressmap_clear_excluded_trackexithost if (len < 6) continue; /* malformed. */ dot = target + len - 6; /* dot now points to just before .exit */ - dot = strrchr(dot, '.'); /* dot now points to the . before .exit or NULL */ - if (!dot) { - nodename = tor_strndup(target, len-5); - } else { - nodename = tor_strndup(dot+1, strlen(dot+1)-5); - } + while(dot > target && *dot != '.') + dot--; + if (*dot == '.') dot++; + nodename = tor_strndup(dot, len-5-(dot-target));; - ri = router_get_by_nickname(nodename, 0); + node = node_get_by_nickname(nodename, 0); tor_free(nodename); - if (!ri || - (allow_nodes && !routerset_contains_router(allow_nodes, ri)) || - routerset_contains_router(exclude_nodes, ri) || + if (!node || + (allow_nodes && !routerset_contains_node(allow_nodes, node)) || + routerset_contains_node(exclude_nodes, node) || !hostname_in_track_host_exits(options, address)) { /* We don't know this one, or we want to be rid of it. */ addressmap_ent_remove(address, ent);