diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-04 18:24:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-04 18:24:20 -0400 |
commit | d7a646edcfbceaab412bc1558ec83a3551c2c8a4 (patch) | |
tree | a0d5b084a6a2d2db7c77e18c94c1bc10c53c9a28 /src/or/routerparse.c | |
parent | ec94d0307e06b9ea5732e86e369dcf5c727f05cb (diff) | |
parent | d827a5495a9d05976f5610655f7e4b5b160a2dac (diff) | |
download | tor-d7a646edcfbceaab412bc1558ec83a3551c2c8a4.tar.gz tor-d7a646edcfbceaab412bc1558ec83a3551c2c8a4.zip |
Merge branch 'bug5535_only_rebased'
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 cda1c00664..7bee08434f 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -524,6 +524,7 @@ static token_rule_t networkstatus_detached_signature_token_table[] = { /** List of tokens recognized in microdescriptors */ static token_rule_t microdesc_token_table[] = { T1_START("onion-key", K_ONION_KEY, NO_ARGS, NEED_KEY_1024), + T0N("a", K_A, GE(1), NO_OBJ ), T01("family", K_FAMILY, ARGS, NO_OBJ ), T01("p", K_P, CONCAT_ARGS, NO_OBJ ), A01("@last-listed", A_LAST_LISTED, CONCAT_ARGS, NO_OBJ ), @@ -4454,6 +4455,14 @@ microdescs_parse_from_string(const char *s, const char *eos, md->onion_pkey = tok->key; tok->key = NULL; + { + smartlist_t *a_lines = find_all_by_keyword(tokens, K_A); + if (a_lines) { + find_single_ipv6_orport(a_lines, &md->ipv6_addr, &md->ipv6_orport); + smartlist_free(a_lines); + } + } + if ((tok = find_opt_by_keyword(tokens, K_FAMILY))) { int i; md->family = smartlist_new(); |