summaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-06 13:46:11 -0500
committerNick Mathewson <nickm@torproject.org>2011-03-06 13:46:11 -0500
commit176e8a0a2aa25839a8ad9f921971703cdd331eb0 (patch)
tree7e269134a89189fa59c0d87cb0067c7efbad3505 /src/or/routerparse.c
parent07b8b439c4bee7545a26a61160b2860b18b88185 (diff)
parent35fcec38809f9805326d8e2c81bad33d0ef000ae (diff)
downloadtor-176e8a0a2aa25839a8ad9f921971703cdd331eb0.tar.gz
tor-176e8a0a2aa25839a8ad9f921971703cdd331eb0.zip
Merge remote branch 'origin/maint-0.2.2'
Conflicts: src/or/routerparse.c
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index c20834ab1e..9b3589231b 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -266,6 +266,8 @@ typedef struct token_rule_t {
static token_rule_t routerdesc_token_table[] = {
T0N("reject", K_REJECT, ARGS, NO_OBJ ),
T0N("accept", K_ACCEPT, ARGS, NO_OBJ ),
+ T0N("reject6", K_REJECT6, ARGS, NO_OBJ ),
+ T0N("accept6", K_ACCEPT6, ARGS, NO_OBJ ),
T1_START( "router", K_ROUTER, GE(5), NO_OBJ ),
T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ),
T1( "onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024 ),
@@ -1493,6 +1495,12 @@ router_parse_entry_from_string(const char *s, const char *end,
router->contact_info = tor_strdup(tok->args[0]);
}
+ if (find_opt_by_keyword(tokens, K_REJECT6) ||
+ find_opt_by_keyword(tokens, K_ACCEPT6)) {
+ log_warn(LD_DIR, "Rejecting router with reject6/accept6 line: they crash "
+ "older Tors.");
+ goto err;
+ }
exit_policy_tokens = find_all_exitpolicy(tokens);
if (!smartlist_len(exit_policy_tokens)) {
log_warn(LD_DIR, "No exit policy tokens in descriptor.");