diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-09-21 21:48:06 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-09-21 21:48:06 +0000 |
commit | a942441615af65a5e80f2d8c1348a4feb7a2ff62 (patch) | |
tree | ddfd5fa34fa1bcf11b1ce8b7187a259637c2c0ef /src/or/routerparse.c | |
parent | b2cc52fa02d3a440f8969b6c616d5acc3c09e50f (diff) | |
download | tor-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/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 12ff72d38d..2f214a1ef4 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -54,6 +54,7 @@ typedef enum { K_SERVER_VERSIONS, K_R, K_S, + K_EVENTDNS, _UNRECOGNIZED, _ERR, _EOF, @@ -145,6 +146,7 @@ static struct { { "dir-options", K_DIR_OPTIONS, ARGS, NO_OBJ, NETSTATUS }, { "client-versions", K_CLIENT_VERSIONS, ARGS, NO_OBJ, NETSTATUS }, { "server-versions", K_SERVER_VERSIONS, ARGS, NO_OBJ, NETSTATUS }, + { "eventdns", K_EVENTDNS, ARGS, NO_OBJ, RTR }, { NULL, -1, NO_ARGS, NO_OBJ, ANY } }; @@ -876,6 +878,13 @@ router_parse_entry_from_string(const char *s, const char *end, router->contact_info = tor_strdup(tok->args[0]); } + if ((tok = find_first_by_keyword(tokens, K_EVENTDNS))) { + router->has_old_dnsworkers = tok->n_args && !strcmp(tok->args[0], "0"); + } else if (router->platform) { + if (! tor_version_as_new_as(router->platform, "0.1.2.2-alpha")) + router->has_old_dnsworkers = 1; + } + exit_policy_tokens = find_all_exitpolicy(tokens); SMARTLIST_FOREACH(exit_policy_tokens, directory_token_t *, t, if (router_add_exit_policy(router,t)<0) { |