summaryrefslogtreecommitdiff
path: root/src/or/routerlist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-09-29 04:51:28 +0000
committerNick Mathewson <nickm@torproject.org>2006-09-29 04:51:28 +0000
commit8992bf6204b70436c2dc881ffa2d79db40384b38 (patch)
tree6739ca3668aef26968b872c15b70dee91b75330d /src/or/routerlist.c
parent4feccecfe813313a8302a44ed560dd7b61c51c2a (diff)
downloadtor-8992bf6204b70436c2dc881ffa2d79db40384b38.tar.gz
tor-8992bf6204b70436c2dc881ffa2d79db40384b38.zip
r8776@totoro: nickm | 2006-09-29 00:50:46 -0400
Reserve the nickname "Unnamed" for routers that can't pick a hostname; any router can call itself Unnamed; directory servers will never allocate Unnamed to any particular router; clients won't believe that any router is the canonical Unnamed. svn:r8529
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r--src/or/routerlist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c
index 031a08fef6..1f932469f1 100644
--- a/src/or/routerlist.c
+++ b/src/or/routerlist.c
@@ -1047,6 +1047,8 @@ router_get_by_nickname(const char *nickname, int warn_if_unnamed)
return NULL;
if (nickname[0] == '$')
return router_get_by_hexdigest(nickname);
+ if (!strcasecmp(nickname, UNNAMED_ROUTER_NICKNAME))
+ return NULL;
if (server_mode(get_options()) &&
!strcasecmp(nickname, get_options()->Nickname))
return router_get_my_routerinfo();