From: Roger Dingledine Date: Fri, 9 Jun 2006 09:07:59 +0000 (+0000) Subject: actually, don't fix it that far. we should still do some X-Git-Tag: tor-0.1.1.23~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6531a31aad038c41670657b2a46d3c67d4b49789;p=thirdparty%2Ftor.git actually, don't fix it that far. we should still do some error checking. svn:r6576 --- diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 4fc56c2ca3..0e08b03b49 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1817,12 +1817,15 @@ add_an_entry_guard(routerinfo_t *chosen) routerinfo_t *router; entry_guard_t *entry; - if (chosen) + if (chosen) { router = chosen; - else + if (is_an_entry_guard(router->cache_info.identity_digest)) + return NULL; + } else { router = choose_good_entry_server(CIRCUIT_PURPOSE_C_GENERAL, NULL); - if (!router) - return NULL; + if (!router) + return NULL; + } entry = tor_malloc_zero(sizeof(entry_guard_t)); log_info(LD_CIRC, "Chose '%s' as new entry guard.", router->nickname); strlcpy(entry->nickname, router->nickname, sizeof(entry->nickname));