diff --git a/src/or/config.c b/src/or/config.c index 045a9b9a00..ab69d0a6d3 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -871,16 +871,16 @@ validate_dir_authorities(or_options_t *options, or_options_t *old_options) /* Now go through the four ways you can configure an alternate * set of directory authorities, and make sure none are broken. */ for (cl = options->DirServers; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; for (cl = options->AlternateBridgeAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; for (cl = options->AlternateDirAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; for (cl = options->AlternateHSAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 1)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 1)<0) return -1; return 0; } @@ -922,16 +922,16 @@ consider_adding_dir_authorities(or_options_t *options, } for (cl = options->DirServers; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; for (cl = options->AlternateBridgeAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; for (cl = options->AlternateDirAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; for (cl = options->AlternateHSAuthority; cl; cl = cl->next) - if (parse_dir_server_line(cl->value, 0, 0)<0) + if (parse_dir_server_line(cl->value, NO_AUTHORITY, 0)<0) return -1; return 0; } @@ -4206,13 +4206,19 @@ static struct unit_table_t memory_units[] = { { "byte", 1<< 0 }, { "bytes", 1<< 0 }, { "kb", 1<<10 }, + { "kbyte", 1<<10 }, + { "kbytes", 1<<10 }, { "kilobyte", 1<<10 }, { "kilobytes", 1<<10 }, { "m", 1<<20 }, { "mb", 1<<20 }, + { "mbyte", 1<<20 }, + { "mbytes", 1<<20 }, { "megabyte", 1<<20 }, { "megabytes", 1<<20 }, { "gb", 1<<30 }, + { "gbyte", 1<<30 }, + { "gbytes", 1<<30 }, { "gigabyte", 1<<30 }, { "gigabytes", 1<<30 }, { "tb", U64_LITERAL(1)<<40 }, diff --git a/src/or/or.h b/src/or/or.h index e33cfc68fe..8be6717a64 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3878,7 +3878,7 @@ int router_digest_version_as_new_as(const char *digest, const char *cutoff); int router_digest_is_trusted_dir_type(const char *digest, authority_type_t type); #define router_digest_is_trusted_dir(d) \ - router_digest_is_trusted_dir_type((d), 0) + router_digest_is_trusted_dir_type((d), NO_AUTHORITY) int router_addr_is_trusted_dir(uint32_t addr); int hexdigest_to_digest(const char *hexdigest, char *digest); diff --git a/src/or/router.c b/src/or/router.c index a64320f11b..510b0b773c 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -551,11 +551,11 @@ init_keys(void) } /* 6b. [authdirserver only] add own key to approved directories. */ crypto_pk_get_digest(get_identity_key(), digest); - type = ((options->V1AuthoritativeDir ? V1_AUTHORITY : 0) | - (options->V2AuthoritativeDir ? V2_AUTHORITY : 0) | - (options->V3AuthoritativeDir ? V3_AUTHORITY : 0) | - (options->BridgeAuthoritativeDir ? BRIDGE_AUTHORITY : 0) | - (options->HSAuthoritativeDir ? HIDSERV_AUTHORITY : 0)); + type = ((options->V1AuthoritativeDir ? V1_AUTHORITY : NO_AUTHORITY) | + (options->V2AuthoritativeDir ? V2_AUTHORITY : NO_AUTHORITY) | + (options->V3AuthoritativeDir ? V3_AUTHORITY : NO_AUTHORITY) | + (options->BridgeAuthoritativeDir ? BRIDGE_AUTHORITY : NO_AUTHORITY) | + (options->HSAuthoritativeDir ? HIDSERV_AUTHORITY : NO_AUTHORITY)); if (!router_digest_is_trusted_dir(digest)) { add_trusted_dir_server(options->Nickname, NULL,