diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-09-26 18:58:45 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-09-26 18:58:45 +0000 |
commit | e147e867bea13515c964e823e3f98c28f90cf22c (patch) | |
tree | a8af8f882985c2edfa36f1eee2e44de17a6a4a80 /src/or/routerparse.c | |
parent | 87eb230c01693c0cdb81d05a6bd2c866874c5e3a (diff) | |
download | tor-e147e867bea13515c964e823e3f98c28f90cf22c.tar.gz tor-e147e867bea13515c964e823e3f98c28f90cf22c.zip |
Proposal 152 implementation from Josh Albrecht, with tweaks.
svn:r16983
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r-- | src/or/routerparse.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 5a8a17796a..c6b7454966 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -63,6 +63,7 @@ typedef enum { K_EXTRA_INFO_DIGEST, K_CACHES_EXTRA_INFO, K_HIDDEN_SERVICE_DIR, + K_ALLOW_SINGLE_HOP_EXITS, K_DIR_KEY_CERTIFICATE_VERSION, K_DIR_IDENTITY_KEY, @@ -239,6 +240,7 @@ static token_rule_t routerdesc_token_table[] = { T01("write-history", K_WRITE_HISTORY, ARGS, NO_OBJ ), T01("extra-info-digest", K_EXTRA_INFO_DIGEST, GE(1), NO_OBJ ), T01("hidden-service-dir", K_HIDDEN_SERVICE_DIR, NO_ARGS, NO_OBJ ), + T01("allow-single-hop-exits",K_ALLOW_SINGLE_HOP_EXITS, NO_ARGS, NO_OBJ ), T01("family", K_FAMILY, ARGS, NO_OBJ ), T01("caches-extra-info", K_CACHES_EXTRA_INFO, NO_ARGS, NO_OBJ ), @@ -1363,6 +1365,9 @@ router_parse_entry_from_string(const char *s, const char *end, if ((tok = find_first_by_keyword(tokens, K_CACHES_EXTRA_INFO))) router->caches_extra_info = 1; + if ((tok = find_first_by_keyword(tokens, K_ALLOW_SINGLE_HOP_EXITS))) + router->allow_single_hop_exits = 1; + if ((tok = find_first_by_keyword(tokens, K_EXTRA_INFO_DIGEST))) { tor_assert(tok->n_args >= 1); if (strlen(tok->args[0]) == HEX_DIGEST_LEN) { |