Merge remote branch 'origin/maint-0.2.2'

Conflicts:
	src/or/routerparse.c
This commit is contained in:
Nick Mathewson 2011-03-06 13:46:11 -05:00
commit 176e8a0a2a
4 changed files with 17 additions and 2 deletions

4
changes/all_descs Normal file
View File

@ -0,0 +1,4 @@
o Major bugfixes (bridge authority)
- Do not allow encrypte requests for "all" bridges to return all
bridges.

View File

@ -1,3 +1,4 @@
o Major bugfixes (directory authority) o Major bugfixes:
- Fix a crash in parsing router descriptors containing IPv6 - Fix a crash in parsing router descriptors containing IPv6
addresses. Bugfix on 0.2.1.3-alpha. addresses. This one crashed the directory authorities when somebody
fired up some experimental code. Bugfix on 0.2.1.3-alpha.

View File

@ -2997,6 +2997,8 @@ dirserv_get_routerdesc_fingerprints(smartlist_t *fps_out, const char *key,
SMARTLIST_FOREACH(rl->routers, routerinfo_t *, r, SMARTLIST_FOREACH(rl->routers, routerinfo_t *, r,
smartlist_add(fps_out, smartlist_add(fps_out,
tor_memdup(r->cache_info.identity_digest, DIGEST_LEN))); tor_memdup(r->cache_info.identity_digest, DIGEST_LEN)));
/* Treat "all" requests as if they were unencrypted */
for_unencrypted_conn = 1;
} else if (!strcmp(key, "authority")) { } else if (!strcmp(key, "authority")) {
const routerinfo_t *ri = router_get_my_routerinfo(); const routerinfo_t *ri = router_get_my_routerinfo();
if (ri) if (ri)

View File

@ -266,6 +266,8 @@ typedef struct token_rule_t {
static token_rule_t routerdesc_token_table[] = { static token_rule_t routerdesc_token_table[] = {
T0N("reject", K_REJECT, ARGS, NO_OBJ ), T0N("reject", K_REJECT, ARGS, NO_OBJ ),
T0N("accept", K_ACCEPT, 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_START( "router", K_ROUTER, GE(5), NO_OBJ ),
T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ), T1( "signing-key", K_SIGNING_KEY, NO_ARGS, NEED_KEY_1024 ),
T1( "onion-key", K_ONION_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]); 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); exit_policy_tokens = find_all_exitpolicy(tokens);
if (!smartlist_len(exit_policy_tokens)) { if (!smartlist_len(exit_policy_tokens)) {
log_warn(LD_DIR, "No exit policy tokens in descriptor."); log_warn(LD_DIR, "No exit policy tokens in descriptor.");