aboutsummaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-09-21 21:48:06 +0000
committerNick Mathewson <nickm@torproject.org>2006-09-21 21:48:06 +0000
commita942441615af65a5e80f2d8c1348a4feb7a2ff62 (patch)
treeddfd5fa34fa1bcf11b1ce8b7187a259637c2c0ef /src/or/router.c
parentb2cc52fa02d3a440f8969b6c616d5acc3c09e50f (diff)
downloadtor-a942441615af65a5e80f2d8c1348a4feb7a2ff62.tar.gz
tor-a942441615af65a5e80f2d8c1348a4feb7a2ff62.zip
r8872@Kushana: nickm | 2006-09-21 14:00:20 -0400
Implement server-side reverse DNS using eventdns. Add an option to routerdescs so we can tell which servers have eventdns enabled. svn:r8437
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 73de2ddc2b..65f34c19c7 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1149,7 +1149,13 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
"uptime %ld\n"
"bandwidth %d %d %d\n"
"onion-key\n%s"
- "signing-key\n%s%s%s%s",
+ "signing-key\n"
+#ifdef USE_EVENTDNS
+ "opt eventdns 1\n"
+#else
+ "opt eventdns 0\n"
+#endif
+ "%s%s%s%s",
router->nickname,
router->address,
router->or_port,
@@ -1228,6 +1234,7 @@ router_dump_router_to_string(char *s, size_t maxlen, routerinfo_t *router,
written += result;
}
} /* end for */
+
if (written+256 > maxlen) /* Not enough room for signature. */
return -1;