aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-06 13:42:05 -0500
committerNick Mathewson <nickm@torproject.org>2011-03-06 13:42:05 -0500
commit4fa70e11ed93e8f2d67dfab6f64080a0d017e2d9 (patch)
treee523da5e4c755ad600beb09fc59f497124713c4f /src/or
parent0f637492e30e19ad7abeedafdd58c087f01b4527 (diff)
parent2ce132e335d60c7ef1d01aa00db5ab4c5b7d674f (diff)
downloadtor-4fa70e11ed93e8f2d67dfab6f64080a0d017e2d9.tar.gz
tor-4fa70e11ed93e8f2d67dfab6f64080a0d017e2d9.zip
Merge branch 'real_ipv6_fix' into maint-0.2.1
Diffstat (limited to 'src/or')
-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 d76b00698f..1faa177edf 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -222,6 +222,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 ),
@@ -1367,6 +1369,12 @@ router_parse_entry_from_string(const char *s, const char *end,
router->has_old_dnsworkers = 1;
}
+ 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.");