From e5dd46beabb7f456fcf4456271676bc507886fe5 Mon Sep 17 00:00:00 2001 From: juga0 Date: Mon, 28 May 2018 14:41:55 +0000 Subject: [PATCH 01/15] Add the Bandwidth List file headers to votes * add bwlist_headers argument to dirserv_read_measured_bandwidth in order to store all the headers found when parsing the file * add bwlist_headers to networkstatus_t in order to store the the headers found by the previous function * include the bandwidth headers as string in vote documents * add test to check that dirserv_read_measured_bandwidth generates the bwlist_headers --- src/app/config/config.c | 2 +- src/feature/dirauth/dirvote.c | 18 +++++++++----- src/feature/dircache/dirserv.c | 15 +++++++++--- src/feature/dircache/dirserv.h | 3 ++- src/test/test_dir.c | 43 +++++++++++++++++++++++++++++++--- 5 files changed, 67 insertions(+), 14 deletions(-) diff --git a/src/app/config/config.c b/src/app/config/config.c index 1f4f099be7..7e78357cc6 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -3560,7 +3560,7 @@ options_validate(or_options_t *old_options, or_options_t *options, "(Bridge/V3)AuthoritativeDir is set."); /* If we have a v3bandwidthsfile and it's broken, complain on startup */ if (options->V3BandwidthsFile && !old_options) { - dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL); + dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL, NULL); } /* same for guardfraction file */ if (options->GuardfractionFile && !old_options) { diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index ce67c1bb9a..27d3a4841b 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -254,6 +254,8 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, /* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/ char *flag_thresholds = dirserv_get_flag_thresholds_line(); char *params; + char *bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers, + " ", 0, NULL); authority_cert_t *cert = v3_ns->cert; char *methods = make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD, @@ -267,7 +269,6 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, params = smartlist_join_strings(v3_ns->net_params, " ", 0, NULL); else params = tor_strdup(""); - tor_assert(cert); smartlist_add_asprintf(chunks, "network-status-version 3\n" @@ -286,7 +287,8 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, "params %s\n" "dir-source %s %s %s %s %d %d\n" "contact %s\n" - "%s", /* shared randomness information */ + "%s" /* shared randomness information */ + "bandwidth-file %s\n", /* bandwidth file headers */ v3_ns->type == NS_TYPE_VOTE ? "vote" : "opinion", methods, published, va, fu, vu, @@ -302,13 +304,15 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, fmt_addr32(addr), voter->dir_port, voter->or_port, voter->contact, shared_random_vote_str ? - shared_random_vote_str : ""); + shared_random_vote_str : "", + bwlist_headers); tor_free(params); tor_free(flags); tor_free(flag_thresholds); tor_free(methods); tor_free(shared_random_vote_str); + tor_free(bwlist_headers); if (!tor_digest_is_zero(voter->legacy_id_digest)) { char fpbuf[HEX_DIGEST_LEN+1]; @@ -4291,7 +4295,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, uint32_t addr; char *hostname = NULL, *client_versions = NULL, *server_versions = NULL; const char *contact; - smartlist_t *routers, *routerstatuses; + smartlist_t *routers, *routerstatuses, *bwlist_headers; char identity_digest[DIGEST_LEN]; char signing_key_digest[DIGEST_LEN]; int listbadexits = options->AuthDirListBadExits; @@ -4338,7 +4342,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, * set_routerstatus_from_routerinfo() see up-to-date bandwidth info. */ if (options->V3BandwidthsFile) { - dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL); + dirserv_read_measured_bandwidths(options->V3BandwidthsFile, NULL, NULL); } else { /* * No bandwidths file; clear the measured bandwidth cache in case we had @@ -4375,6 +4379,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, routerstatuses = smartlist_new(); microdescriptors = smartlist_new(); + bwlist_headers = smartlist_new(); SMARTLIST_FOREACH_BEGIN(routers, routerinfo_t *, ri) { /* If it has a protover list and contains a protocol name greater than @@ -4441,7 +4446,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, /* This pass through applies the measured bw lines to the routerstatuses */ if (options->V3BandwidthsFile) { dirserv_read_measured_bandwidths(options->V3BandwidthsFile, - routerstatuses); + routerstatuses, bwlist_headers); } else { /* * No bandwidths file; clear the measured bandwidth cache in case we had @@ -4537,6 +4542,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, options->ConsensusParams, NULL, 0, 0); smartlist_sort_strings(v3_out->net_params); } + v3_out->bwlist_headers = bwlist_headers; voter = tor_malloc_zero(sizeof(networkstatus_voter_info_t)); voter->nickname = tor_strdup(options->Nickname); diff --git a/src/feature/dircache/dirserv.c b/src/feature/dircache/dirserv.c index 1500467ec0..ea7b29c464 100644 --- a/src/feature/dircache/dirserv.c +++ b/src/feature/dircache/dirserv.c @@ -2599,12 +2599,14 @@ measured_bw_line_apply(measured_bw_line_t *parsed_line, } /** - * Read the measured bandwidth file and apply it to the list of - * vote_routerstatus_t. Returns -1 on error, 0 otherwise. + * Read the measured bandwidth list file, apply it to the list of + * vote_routerstatus_t and store all the headers in bwlist_headers. + * Returns -1 on error, 0 otherwise. */ int dirserv_read_measured_bandwidths(const char *from_file, - smartlist_t *routerstatuses) + smartlist_t *routerstatuses, + smartlist_t *bwlist_headers) { FILE *fp = tor_fopen_cloexec(from_file, "r"); int applied_lines = 0; @@ -2654,6 +2656,8 @@ dirserv_read_measured_bandwidths(const char *from_file, goto err; } + smartlist_add_asprintf(bwlist_headers, "timestamp=%ld", file_time); + if (routerstatuses) smartlist_sort(routerstatuses, compare_vote_routerstatus_entries); @@ -2669,6 +2673,11 @@ dirserv_read_measured_bandwidths(const char *from_file, dirserv_cache_measured_bw(&parsed_line, file_time); if (measured_bw_line_apply(&parsed_line, routerstatuses) > 0) applied_lines++; + } else { + if (strcmp(line, "====\n") != 0) { + line[strlen(line)-1] = '\0'; + smartlist_add_strdup(bwlist_headers, line); + }; } } } diff --git a/src/feature/dircache/dirserv.h b/src/feature/dircache/dirserv.h index 3b4a646094..deff9df347 100644 --- a/src/feature/dircache/dirserv.h +++ b/src/feature/dircache/dirserv.h @@ -215,7 +215,8 @@ dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str, #endif /* defined(DIRSERV_PRIVATE) */ int dirserv_read_measured_bandwidths(const char *from_file, - smartlist_t *routerstatuses); + smartlist_t *routerstatuses, + smartlist_t *bwlist_headers); int dirserv_read_guardfraction_file(const char *fname, smartlist_t *vote_routerstatuses); diff --git a/src/test/test_dir.c b/src/test/test_dir.c index bda56b3a8e..e44f161547 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -1595,18 +1595,55 @@ test_dir_measured_bw_kb(void *arg) static void test_dir_dirserv_read_measured_bandwidths_empty(void *arg) { - char *fname=NULL; (void)arg; + char *content = NULL; + time_t timestamp = time(NULL); + char *fname = tor_strdup(get_fname("V3BandwidthsFile")); + smartlist_t *bwlist_headers = smartlist_new(); + char *bwlist_headers_str = NULL; + char *out_bwlist_headers_str = NULL; - fname = tor_strdup(get_fname("V3BandwidthsFile")); /* Test an empty file */ write_str_to_file(fname, "", 0); setup_capture_of_logs(LOG_WARN); - tt_int_op(-1, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL)); + tt_int_op(-1, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL, NULL)); expect_log_msg("Empty bandwidth file\n"); + /* Test v1.1.0 headers */ + const char *v110_header_lines= + "version=1.1.0\n" + "software=sbws\n" + "software_version=0.1.0\n" + "generator_started=2018-05-08T16:13:25\n" + "earliest_bandwidth=2018-05-08T16:13:26\n" + "====\n"; + + /* And test bwlist_headers generation for dirvote.c */ + tor_asprintf(&content, "%ld\n%s", timestamp, v110_header_lines); + write_str_to_file(fname, content, 0); + tor_free(content); + tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL, + bwlist_headers)); + + /* The bwlist_headers str that should get generated by the previous + * v110v110_header_lines */ + const char *headers_str = "version=1.1.0 software=sbws " + "software_version=0.1.0 " + "generator_started=2018-05-08T16:13:25 " + "earliest_bandwidth=2018-05-08T16:13:26"; + tor_asprintf(&bwlist_headers_str, "timestamp=%ld %s", timestamp, + headers_str); + /* Compare the strings */ + out_bwlist_headers_str = smartlist_join_strings(bwlist_headers, " ", + 0, NULL); + tt_str_op(bwlist_headers_str, OP_EQ, out_bwlist_headers_str); + done: tor_free(fname); + tor_free(bwlist_headers_str); + tor_free(out_bwlist_headers_str); + SMARTLIST_FOREACH(bwlist_headers, char *, cp, tor_free(cp)); + smartlist_free(bwlist_headers); teardown_capture_of_logs(); } From 086060e138d0fe5904a8b09d48bdcf9d8922af39 Mon Sep 17 00:00:00 2001 From: juga0 Date: Thu, 31 May 2018 08:07:22 +0000 Subject: [PATCH 02/15] Do not add bw file line to the vote when there are not bw file headers lines. --- src/feature/dirauth/dirvote.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index 27d3a4841b..a1bafb4fd4 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -254,8 +254,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, /* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/ char *flag_thresholds = dirserv_get_flag_thresholds_line(); char *params; - char *bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers, - " ", 0, NULL); + char *bwlist_headers; authority_cert_t *cert = v3_ns->cert; char *methods = make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD, @@ -270,6 +269,11 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, else params = tor_strdup(""); tor_assert(cert); + if (v3_ns->bwlist_headers) + bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers, " ", 0, + NULL); + else + bwlist_headers = tor_strdup(""); smartlist_add_asprintf(chunks, "network-status-version 3\n" "vote-status %s\n" From f0a4a5f726cf1939461cbf9a4b73060770bbc3e7 Mon Sep 17 00:00:00 2001 From: juga0 Date: Thu, 31 May 2018 09:03:39 +0000 Subject: [PATCH 03/15] Check that the header is key_value to avoid interpreting as headers extra lines that are not key_values --- src/feature/dircache/dirserv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/feature/dircache/dirserv.c b/src/feature/dircache/dirserv.c index ea7b29c464..e7b5239e0b 100644 --- a/src/feature/dircache/dirserv.c +++ b/src/feature/dircache/dirserv.c @@ -2674,7 +2674,10 @@ dirserv_read_measured_bandwidths(const char *from_file, if (measured_bw_line_apply(&parsed_line, routerstatuses) > 0) applied_lines++; } else { - if (strcmp(line, "====\n") != 0) { + /* If line does not contain the header separator and it is key_value, + * it is probably a KeyValue header.*/ + if (strcmp(line, "====\n") != 0 && + string_is_key_value(LOG_DEBUG, line)) { line[strlen(line)-1] = '\0'; smartlist_add_strdup(bwlist_headers, line); }; From 106eb08d276144972a573b0480c0189eabc8fafc Mon Sep 17 00:00:00 2001 From: juga0 Date: Fri, 29 Jun 2018 13:43:38 +0000 Subject: [PATCH 04/15] Add bw_file_headers to networkstatus_t --- src/feature/nodelist/networkstatus_st.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/feature/nodelist/networkstatus_st.h b/src/feature/nodelist/networkstatus_st.h index 46b0f53c0b..2bb0e3ae35 100644 --- a/src/feature/nodelist/networkstatus_st.h +++ b/src/feature/nodelist/networkstatus_st.h @@ -96,6 +96,9 @@ struct networkstatus_t { /** Contains the shared random protocol data from a vote or consensus. */ networkstatus_sr_info_t sr_info; + + /** List of key=value strings from the headers of the bandwidth list file */ + smartlist_t *bw_file_headers; }; #endif From 6d8bc12583939f7f4849b4a86599f896db85e2f8 Mon Sep 17 00:00:00 2001 From: juga0 Date: Fri, 29 Jun 2018 13:45:06 +0000 Subject: [PATCH 05/15] Free bw_list_headers in networstatus_t --- src/feature/nodelist/networkstatus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c index e9d36cbdcb..252e01eb4c 100644 --- a/src/feature/nodelist/networkstatus.c +++ b/src/feature/nodelist/networkstatus.c @@ -385,6 +385,11 @@ networkstatus_vote_free_(networkstatus_t *ns) smartlist_free(ns->routerstatus_list); } + if (ns->bw_file_headers) { + SMARTLIST_FOREACH(ns->bw_file_headers, char *, c, tor_free(c)); + smartlist_free(ns->bw_file_headers); + } + digestmap_free(ns->desc_digest_map, NULL); if (ns->sr_info.commits) { From d79c65772bd88b7b2810750237057fafbe8ea076 Mon Sep 17 00:00:00 2001 From: juga0 Date: Fri, 29 Jun 2018 20:43:51 +0000 Subject: [PATCH 06/15] Rename bwlist to bw_file and banwidth to bandwidth-file --- src/feature/dirauth/dirvote.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index a1bafb4fd4..b123f73a41 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -254,7 +254,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, /* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/ char *flag_thresholds = dirserv_get_flag_thresholds_line(); char *params; - char *bwlist_headers; + char *bw_file_headers; authority_cert_t *cert = v3_ns->cert; char *methods = make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD, @@ -269,11 +269,11 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, else params = tor_strdup(""); tor_assert(cert); - if (v3_ns->bwlist_headers) - bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers, " ", 0, + if (v3_ns->bw_file_headers) + bw_file_headers = smartlist_join_strings(v3_ns->bw_file_headers, " ", 0, NULL); else - bwlist_headers = tor_strdup(""); + bw_file_headers = tor_strdup(""); smartlist_add_asprintf(chunks, "network-status-version 3\n" "vote-status %s\n" @@ -292,7 +292,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, "dir-source %s %s %s %s %d %d\n" "contact %s\n" "%s" /* shared randomness information */ - "bandwidth-file %s\n", /* bandwidth file headers */ + "bandwidth-file-headers %s\n", /* bandwidth file headers */ v3_ns->type == NS_TYPE_VOTE ? "vote" : "opinion", methods, published, va, fu, vu, @@ -309,14 +309,14 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, voter->contact, shared_random_vote_str ? shared_random_vote_str : "", - bwlist_headers); + bw_file_headers); tor_free(params); tor_free(flags); tor_free(flag_thresholds); tor_free(methods); tor_free(shared_random_vote_str); - tor_free(bwlist_headers); + tor_free(bw_file_headers); if (!tor_digest_is_zero(voter->legacy_id_digest)) { char fpbuf[HEX_DIGEST_LEN+1]; @@ -4299,7 +4299,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, uint32_t addr; char *hostname = NULL, *client_versions = NULL, *server_versions = NULL; const char *contact; - smartlist_t *routers, *routerstatuses, *bwlist_headers; + smartlist_t *routers, *routerstatuses, *bw_file_headers; char identity_digest[DIGEST_LEN]; char signing_key_digest[DIGEST_LEN]; int listbadexits = options->AuthDirListBadExits; @@ -4383,7 +4383,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, routerstatuses = smartlist_new(); microdescriptors = smartlist_new(); - bwlist_headers = smartlist_new(); + bw_file_headers = smartlist_new(); SMARTLIST_FOREACH_BEGIN(routers, routerinfo_t *, ri) { /* If it has a protover list and contains a protocol name greater than @@ -4450,7 +4450,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, /* This pass through applies the measured bw lines to the routerstatuses */ if (options->V3BandwidthsFile) { dirserv_read_measured_bandwidths(options->V3BandwidthsFile, - routerstatuses, bwlist_headers); + routerstatuses, bw_file_headers); } else { /* * No bandwidths file; clear the measured bandwidth cache in case we had @@ -4546,7 +4546,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, options->ConsensusParams, NULL, 0, 0); smartlist_sort_strings(v3_out->net_params); } - v3_out->bwlist_headers = bwlist_headers; + v3_out->bw_file_headers = bw_file_headers; voter = tor_malloc_zero(sizeof(networkstatus_voter_info_t)); voter->nickname = tor_strdup(options->Nickname); From f906d9be111bd8eb55cad8478fdab8f20a10a13d Mon Sep 17 00:00:00 2001 From: juga0 Date: Sat, 30 Jun 2018 06:12:36 +0000 Subject: [PATCH 07/15] Replace bwlist by bw_file and add bw file terminator constant --- src/feature/dircache/dirserv.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/feature/dircache/dirserv.h b/src/feature/dircache/dirserv.h index deff9df347..ffc50b5222 100644 --- a/src/feature/dircache/dirserv.h +++ b/src/feature/dircache/dirserv.h @@ -49,6 +49,13 @@ typedef enum { /** Maximum allowable length of a version line in a networkstatus. */ #define MAX_V_LINE_LEN 128 +/** Maximum allowable length of bandwidth headers in a bandwidth file */ +#define MAX_BW_FILE_HEADER_COUNT_IN_VOTE 50 + +/** Terminatore that separates bandwidth file headers from bandwidth file + * relay lines */ +#define BW_FILE_HEADERS_TERMINATOR "=====\n" + /** Ways to convert a spoolable_resource_t to a bunch of bytes. */ typedef enum dir_spool_source_t { DIR_SPOOL_SERVER_BY_DIGEST=1, DIR_SPOOL_SERVER_BY_FP, @@ -216,7 +223,7 @@ dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str, int dirserv_read_measured_bandwidths(const char *from_file, smartlist_t *routerstatuses, - smartlist_t *bwlist_headers); + smartlist_t *bw_file_headers); int dirserv_read_guardfraction_file(const char *fname, smartlist_t *vote_routerstatuses); From 87fc409a70cccf448072a9ce109a4efb3fcf26e9 Mon Sep 17 00:00:00 2001 From: juga0 Date: Sat, 30 Jun 2018 06:16:17 +0000 Subject: [PATCH 08/15] Replace bwlist by bw_file and terminator condition If bandwidth file terminator is found, set end of headers flag and do not store the line. If it is not, parse a relay line and check whether it is a header line. --- src/feature/dircache/dirserv.c | 35 ++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/src/feature/dircache/dirserv.c b/src/feature/dircache/dirserv.c index e7b5239e0b..c3ccc3c8ff 100644 --- a/src/feature/dircache/dirserv.c +++ b/src/feature/dircache/dirserv.c @@ -2600,13 +2600,13 @@ measured_bw_line_apply(measured_bw_line_t *parsed_line, /** * Read the measured bandwidth list file, apply it to the list of - * vote_routerstatus_t and store all the headers in bwlist_headers. + * vote_routerstatus_t and store all the headers in bw_file_headers. * Returns -1 on error, 0 otherwise. */ int dirserv_read_measured_bandwidths(const char *from_file, smartlist_t *routerstatuses, - smartlist_t *bwlist_headers) + smartlist_t *bw_file_headers) { FILE *fp = tor_fopen_cloexec(from_file, "r"); int applied_lines = 0; @@ -2656,7 +2656,11 @@ dirserv_read_measured_bandwidths(const char *from_file, goto err; } - smartlist_add_asprintf(bwlist_headers, "timestamp=%ld", file_time); + /* If timestamp was correct and bw_file_headers is not NULL, + * add timestamp to bw_file_headers */ + if (bw_file_headers) + smartlist_add_asprintf(bw_file_headers, "timestamp=%lu", + (unsigned long)file_time); if (routerstatuses) smartlist_sort(routerstatuses, compare_vote_routerstatus_entries); @@ -2673,15 +2677,22 @@ dirserv_read_measured_bandwidths(const char *from_file, dirserv_cache_measured_bw(&parsed_line, file_time); if (measured_bw_line_apply(&parsed_line, routerstatuses) > 0) applied_lines++; - } else { - /* If line does not contain the header separator and it is key_value, - * it is probably a KeyValue header.*/ - if (strcmp(line, "====\n") != 0 && - string_is_key_value(LOG_DEBUG, line)) { - line[strlen(line)-1] = '\0'; - smartlist_add_strdup(bwlist_headers, line); - }; - } + /* if the terminator is found, it is the end of header lines, set the + * flag but do not store anything */ + } else if (strcmp(line, BW_FILE_TERMINATOR) == 0) + line_is_after_headers = 1; + /* if the line was not a correct relay line nor the terminator and + * the end of the header lines has not been detected yet + * and it is key_value and bw_file_headers did not reach the maximum + * number of headers, + * then assume this line is a header and add it to bw_file_headers */ + else if (bw_file_headers && + (line_is_after_headers == 0) && + string_is_key_value(LOG_DEBUG, line) && + (smartlist_len(bw_file_headers) < MAX_BW_FILE_HEADERS_LEN)) { + line[strlen(line)-1] = '\0'; + smartlist_add_strdup(bw_file_headers, line); + }; } } From e87793bae52baf7673b3083e85b7121ffcfea290 Mon Sep 17 00:00:00 2001 From: juga0 Date: Sat, 30 Jun 2018 06:29:11 +0000 Subject: [PATCH 09/15] Move bandwidth file tests to same function also add tests for bw_file_headers. Headers are all that is found before a correct relay line or the terminator. Tests include: * a empty bandwidth file * a bandwidth file with only timestamp * a bandwidth file with v1.0.0 headers * a bandwidth file with v1.0.0 headers and relay lines * a bandwidth file with v1.1.0 headers and v1.0.0 relay lines * a bandwidth file with v1.0.0 headers, malformed relay lines and relay lines * a bandwidth file with v1.0.0 headers, malformed relay lines, relay lines and malformed relay lines * a bandwidth file with v1.1.0 headers without terminator * a bandwidth file with v1.1.0 headers with terminator * a bandwidth file with v1.1.0 headers without terminator and relay lines * a bandwidth file with v1.1.0 headers with terminator and relay lines * a bandwidth file with v1.1.0 headers without terminator, bad relay lines and relay lines * a bandwidth file with v1.1.0 headers with terminator, bad relay lines and relay lines --- src/test/test_dir.c | 348 +++++++++++++++++++++++++++++--------------- 1 file changed, 234 insertions(+), 114 deletions(-) diff --git a/src/test/test_dir.c b/src/test/test_dir.c index e44f161547..c4af7b2555 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -1591,62 +1591,6 @@ test_dir_measured_bw_kb(void *arg) return; } -/* Test dirserv_read_measured_bandwidths */ -static void -test_dir_dirserv_read_measured_bandwidths_empty(void *arg) -{ - (void)arg; - char *content = NULL; - time_t timestamp = time(NULL); - char *fname = tor_strdup(get_fname("V3BandwidthsFile")); - smartlist_t *bwlist_headers = smartlist_new(); - char *bwlist_headers_str = NULL; - char *out_bwlist_headers_str = NULL; - - /* Test an empty file */ - write_str_to_file(fname, "", 0); - setup_capture_of_logs(LOG_WARN); - tt_int_op(-1, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL, NULL)); - expect_log_msg("Empty bandwidth file\n"); - - /* Test v1.1.0 headers */ - const char *v110_header_lines= - "version=1.1.0\n" - "software=sbws\n" - "software_version=0.1.0\n" - "generator_started=2018-05-08T16:13:25\n" - "earliest_bandwidth=2018-05-08T16:13:26\n" - "====\n"; - - /* And test bwlist_headers generation for dirvote.c */ - tor_asprintf(&content, "%ld\n%s", timestamp, v110_header_lines); - write_str_to_file(fname, content, 0); - tor_free(content); - tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL, - bwlist_headers)); - - /* The bwlist_headers str that should get generated by the previous - * v110v110_header_lines */ - const char *headers_str = "version=1.1.0 software=sbws " - "software_version=0.1.0 " - "generator_started=2018-05-08T16:13:25 " - "earliest_bandwidth=2018-05-08T16:13:26"; - tor_asprintf(&bwlist_headers_str, "timestamp=%ld %s", timestamp, - headers_str); - /* Compare the strings */ - out_bwlist_headers_str = smartlist_join_strings(bwlist_headers, " ", - 0, NULL); - tt_str_op(bwlist_headers_str, OP_EQ, out_bwlist_headers_str); - - done: - tor_free(fname); - tor_free(bwlist_headers_str); - tor_free(out_bwlist_headers_str); - SMARTLIST_FOREACH(bwlist_headers, char *, cp, tor_free(cp)); - smartlist_free(bwlist_headers); - teardown_capture_of_logs(); -} - /* Unit tests for measured_bw_line_parse using line_is_after_headers flag. * When the end of the header is detected (a first complete bw line is parsed), * incomplete lines fail and give warnings, but do not give warnings if @@ -1690,7 +1634,7 @@ test_dir_measured_bw_kb_line_is_after_headers(void *arg) teardown_capture_of_logs(); } -/* Test dirserv_read_measured_bandwidths with whole files. */ +/* Test dirserv_read_measured_bandwidths with headers and complete files. */ static void test_dir_dirserv_read_measured_bandwidths(void *arg) { @@ -1698,76 +1642,253 @@ test_dir_dirserv_read_measured_bandwidths(void *arg) char *content = NULL; time_t timestamp = time(NULL); char *fname = tor_strdup(get_fname("V3BandwidthsFile")); - - /* Test Torflow file only with timestamp*/ - tor_asprintf(&content, "%ld", (long)timestamp); - write_str_to_file(fname, content, 0); - tor_free(content); - tt_int_op(-1, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL)); - - /* Test Torflow file with timestamp followed by '\n' */ - tor_asprintf(&content, "%ld\n", (long)timestamp); - write_str_to_file(fname, content, 0); - tor_free(content); - tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL)); - - /* Test Torflow complete file*/ - const char *torflow_relay_lines= + smartlist_t *bw_file_headers = smartlist_new(); + /* bw file strings in vote */ + char *bw_file_headers_str = NULL; + char *bw_file_headers_str_v100 = NULL; + char *bw_file_headers_str_v110 = NULL; + char *bw_file_headers_str_bad = NULL; + char *bw_file_headers_str_extra = NULL; + char bw_file_headers_str_long[MAX_BW_FILE_HEADERS_LEN * 8 + 1] = ""; + /* string header lines in bw file */ + char *header_lines_v100 = NULL; + char *header_lines_v110_no_terminator = NULL; + char *header_lines_v110 = NULL; + char header_lines_long[MAX_BW_FILE_HEADERS_LEN * 8 + 1] = ""; + int i; + const char *header_lines_v110_no_terminator_no_timestamp = + "version=1.1.0\n" + "software=sbws\n" + "software_version=0.1.0\n" + "earliest_bandwidth=2018-05-08T16:13:26\n" + "file_created=2018-04-16T21:49:18\n" + "generator_started=2018-05-08T16:13:25\n" + "latest_bandwidth=2018-04-16T20:49:18\n"; + const char *bw_file_headers_str_v110_no_timestamp = + "version=1.1.0 software=sbws " + "software_version=0.1.0 " + "earliest_bandwidth=2018-05-08T16:13:26 " + "file_created=2018-04-16T21:49:18 " + "generator_started=2018-05-08T16:13:25 " + "latest_bandwidth=2018-04-16T20:49:18"; + const char *relay_lines_v100 = "node_id=$557365204145532d32353620696e73746561642e bw=1024 " "nick=Test measured_at=1523911725 updated_at=1523911725 " "pid_error=4.11374090719 pid_error_sum=4.11374090719 " "pid_bw=57136645 pid_delta=2.12168374577 circ_fail=0.2 " "scanner=/filepath\n"; - - tor_asprintf(&content, "%ld\n%s", (long)timestamp, torflow_relay_lines); - write_str_to_file(fname, content, 0); - tor_free(content); - tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL)); - - /* Test Torflow complete file including v1.1.0 headers */ - const char *v110_header_lines= - "version=1.1.0\n" - "software=sbws\n" - "software_version=0.1.0\n" - "generator_started=2018-05-08T16:13:25\n" - "earliest_bandwidth=2018-05-08T16:13:26\n" - "====\n"; - - tor_asprintf(&content, "%ld\n%s%s", (long)timestamp, v110_header_lines, - torflow_relay_lines); - write_str_to_file(fname, content, 0); - tor_free(content); - tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL)); - - /* Test Torflow with additional headers afer a correct bw line */ - tor_asprintf(&content, "%ld\n%s%s", (long)timestamp, torflow_relay_lines, - v110_header_lines); - write_str_to_file(fname, content, 0); - tor_free(content); - tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL)); - - /* Test Torflow with additional headers afer a correct bw line and more - * bw lines after the headers. */ - tor_asprintf(&content, "%ld\n%s%s%s", (long)timestamp, torflow_relay_lines, - v110_header_lines, torflow_relay_lines); - write_str_to_file(fname, content, 0); - tor_free(content); - tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL)); - - /* Test sbws file */ - const char *sbws_relay_lines= + const char *relay_lines_v110 = "node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A27F80 " "master_key_ed25519=YaqV4vbvPYKucElk297eVdNArDz9HtIwUoIeo0+cVIpQ " "bw=760 nick=Test rtt=380 time=2018-05-08T16:13:26\n"; + const char *relay_lines_bad = + "node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A27F80 \n"; - tor_asprintf(&content, "%ld\n%s%s", (long)timestamp, v110_header_lines, - sbws_relay_lines); + tor_asprintf(&header_lines_v100, "%ld\n", (long)timestamp); + tor_asprintf(&header_lines_v110_no_terminator, "%ld\n%s", (long)timestamp, + header_lines_v110_no_terminator_no_timestamp); + tor_asprintf(&header_lines_v110, "%s%s", + header_lines_v110_no_terminator, BW_FILE_HEADERS_TERMINATOR); + + tor_asprintf(&bw_file_headers_str_v100, "timestamp=%ld",(long)timestamp); + tor_asprintf(&bw_file_headers_str_v110, "timestamp=%ld %s", + (long)timestamp, bw_file_headers_str_v110_no_timestamp); + tor_asprintf(&bw_file_headers_str_bad, "%s " + "node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A27F80 ", + bw_file_headers_str_v110); + + for (i=0; i Date: Sat, 30 Jun 2018 13:52:54 +0000 Subject: [PATCH 10/15] Add test with NULL bw_file_header and complete v1.0.0 bandwidth file --- src/test/test_dir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/test_dir.c b/src/test/test_dir.c index c4af7b2555..23faace086 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -1764,6 +1764,12 @@ test_dir_dirserv_read_measured_bandwidths(void *arg) smartlist_free(bw_file_headers); tor_free(bw_file_headers_str); + /* Test v1.0.0 complete bandwidth file with NULL bw_file_headers. */ + tor_asprintf(&content, "%s%s", header_lines_v100, relay_lines_v100); + write_str_to_file(fname, content, 0); + tor_free(content); + tt_int_op(0, OP_EQ, dirserv_read_measured_bandwidths(fname, NULL, NULL)); + /* Test bandwidth file including v1.1.0 bandwidth headers and * v1.0.0 relay lines. bw_file_headers will contain the v1.1.0 headers. */ bw_file_headers = smartlist_new(); From 8164534f4669b2a3de075d1f57176540406be991 Mon Sep 17 00:00:00 2001 From: juga0 Date: Sat, 30 Jun 2018 13:56:38 +0000 Subject: [PATCH 11/15] Ensure that bw_file_headers is not bigger than max --- src/feature/dirauth/dirvote.c | 23 ++++++++++++++++------- src/feature/dirauth/dirvote.h | 3 +++ src/feature/dircache/dirserv.c | 8 +++++--- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index b123f73a41..e3b7016076 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -254,7 +254,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, /* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/ char *flag_thresholds = dirserv_get_flag_thresholds_line(); char *params; - char *bw_file_headers; + char *bw_file_headers = NULL; authority_cert_t *cert = v3_ns->cert; char *methods = make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD, @@ -269,11 +269,19 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, else params = tor_strdup(""); tor_assert(cert); - if (v3_ns->bw_file_headers) - bw_file_headers = smartlist_join_strings(v3_ns->bw_file_headers, " ", 0, - NULL); - else - bw_file_headers = tor_strdup(""); + + if (v3_ns->bw_file_headers) { + if (! BUG(smartlist_len(v3_ns->bw_file_headers) + > MAX_BW_FILE_HEADER_COUNT_IN_VOTE)) { + bw_file_headers = smartlist_join_strings(v3_ns->bw_file_headers, " ", + 0, NULL); + if (BUG(strlen(bw_file_headers) > MAX_BW_FILE_HEADERS_LINE_LEN)) { + /* Free and set to NULL, so the vote header line is empty */ + tor_free(bw_file_headers); + } + } + } + smartlist_add_asprintf(chunks, "network-status-version 3\n" "vote-status %s\n" @@ -309,7 +317,8 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, voter->contact, shared_random_vote_str ? shared_random_vote_str : "", - bw_file_headers); + bw_file_headers ? + bw_file_headers : ""); tor_free(params); tor_free(flags); diff --git a/src/feature/dirauth/dirvote.h b/src/feature/dirauth/dirvote.h index 7ce8e4a699..979a2be8a6 100644 --- a/src/feature/dirauth/dirvote.h +++ b/src/feature/dirauth/dirvote.h @@ -89,6 +89,9 @@ #define DGV_INCLUDE_PENDING 2 #define DGV_INCLUDE_PREVIOUS 4 +/** Maximum size of a line in a vote. */ +#define MAX_BW_FILE_HEADERS_LINE_LEN 1024 + /* * Public API. Used outside of the dirauth subsystem. * diff --git a/src/feature/dircache/dirserv.c b/src/feature/dircache/dirserv.c index c3ccc3c8ff..411a1a0bd3 100644 --- a/src/feature/dircache/dirserv.c +++ b/src/feature/dircache/dirserv.c @@ -2679,17 +2679,19 @@ dirserv_read_measured_bandwidths(const char *from_file, applied_lines++; /* if the terminator is found, it is the end of header lines, set the * flag but do not store anything */ - } else if (strcmp(line, BW_FILE_TERMINATOR) == 0) + } else if (strcmp(line, BW_FILE_HEADERS_TERMINATOR) == 0) { line_is_after_headers = 1; /* if the line was not a correct relay line nor the terminator and * the end of the header lines has not been detected yet * and it is key_value and bw_file_headers did not reach the maximum * number of headers, * then assume this line is a header and add it to bw_file_headers */ - else if (bw_file_headers && + } else if (bw_file_headers && (line_is_after_headers == 0) && string_is_key_value(LOG_DEBUG, line) && - (smartlist_len(bw_file_headers) < MAX_BW_FILE_HEADERS_LEN)) { + !strchr(line, ' ') && + (smartlist_len(bw_file_headers) + < MAX_BW_FILE_HEADER_COUNT_IN_VOTE)) { line[strlen(line)-1] = '\0'; smartlist_add_strdup(bw_file_headers, line); }; From c6aee94d1983ad644da51fc1082d673f7a0d5220 Mon Sep 17 00:00:00 2001 From: juga0 Date: Sat, 30 Jun 2018 13:57:41 +0000 Subject: [PATCH 12/15] Add tests for max length bw file headers --- src/test/test_dir.c | 74 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 68 insertions(+), 6 deletions(-) diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 23faace086..48d50b05f4 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -1649,12 +1649,12 @@ test_dir_dirserv_read_measured_bandwidths(void *arg) char *bw_file_headers_str_v110 = NULL; char *bw_file_headers_str_bad = NULL; char *bw_file_headers_str_extra = NULL; - char bw_file_headers_str_long[MAX_BW_FILE_HEADERS_LEN * 8 + 1] = ""; + char bw_file_headers_str_long[MAX_BW_FILE_HEADER_COUNT_IN_VOTE * 8 + 1] = ""; /* string header lines in bw file */ char *header_lines_v100 = NULL; char *header_lines_v110_no_terminator = NULL; char *header_lines_v110 = NULL; - char header_lines_long[MAX_BW_FILE_HEADERS_LEN * 8 + 1] = ""; + char header_lines_long[MAX_BW_FILE_HEADER_COUNT_IN_VOTE * 8 + 1] = ""; int i; const char *header_lines_v110_no_terminator_no_timestamp = "version=1.1.0\n" @@ -1682,7 +1682,7 @@ test_dir_dirserv_read_measured_bandwidths(void *arg) "master_key_ed25519=YaqV4vbvPYKucElk297eVdNArDz9HtIwUoIeo0+cVIpQ " "bw=760 nick=Test rtt=380 time=2018-05-08T16:13:26\n"; const char *relay_lines_bad = - "node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A27F80 \n"; + "node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A\n"; tor_asprintf(&header_lines_v100, "%ld\n", (long)timestamp); tor_asprintf(&header_lines_v110_no_terminator, "%ld\n%s", (long)timestamp, @@ -1694,15 +1694,15 @@ test_dir_dirserv_read_measured_bandwidths(void *arg) tor_asprintf(&bw_file_headers_str_v110, "timestamp=%ld %s", (long)timestamp, bw_file_headers_str_v110_no_timestamp); tor_asprintf(&bw_file_headers_str_bad, "%s " - "node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A27F80 ", + "node_id=$68A483E05A2ABDCA6DA5A3EF8DB5177638A", bw_file_headers_str_v110); - for (i=0; i Date: Sun, 1 Jul 2018 08:07:27 +0000 Subject: [PATCH 13/15] Add keyval header, that was moved to other file --- src/feature/dircache/dirserv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/feature/dircache/dirserv.c b/src/feature/dircache/dirserv.c index 411a1a0bd3..b85db8324f 100644 --- a/src/feature/dircache/dirserv.c +++ b/src/feature/dircache/dirserv.c @@ -51,6 +51,7 @@ #include "lib/crypt_ops/crypto_format.h" #include "lib/encoding/confline.h" +#include "lib/encoding/keyval.h" /** * \file dirserv.c * \brief Directory server core implementation. Manages directory From 79f249e786abfca909e809f18d78e1f4f77463b5 Mon Sep 17 00:00:00 2001 From: teor Date: Mon, 16 Jul 2018 13:33:18 +1000 Subject: [PATCH 14/15] dirauth: Handle V3BandwidthsFile failure modes according to the new spec If an authority is not configured with a V3BandwidthsFile, this line SHOULD NOT appear in its vote. If an authority is configured with a V3BandwidthsFile, but parsing fails, this line SHOULD appear in its vote, but without any headers. Part of 3723, implements the spec in 26799. --- src/feature/dirauth/dirvote.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/feature/dirauth/dirvote.c b/src/feature/dirauth/dirvote.c index e3b7016076..6ab02fb11d 100644 --- a/src/feature/dirauth/dirvote.c +++ b/src/feature/dirauth/dirvote.c @@ -254,7 +254,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, /* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/ char *flag_thresholds = dirserv_get_flag_thresholds_line(); char *params; - char *bw_file_headers = NULL; + char *bw_headers_line = NULL; authority_cert_t *cert = v3_ns->cert; char *methods = make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD, @@ -270,16 +270,28 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, params = tor_strdup(""); tor_assert(cert); + /* v3_ns->bw_file_headers is only set when V3BandwidthsFile is + * configured */ if (v3_ns->bw_file_headers) { + char *bw_file_headers = NULL; + /* If there are too many headers, leave the header string NULL */ if (! BUG(smartlist_len(v3_ns->bw_file_headers) > MAX_BW_FILE_HEADER_COUNT_IN_VOTE)) { bw_file_headers = smartlist_join_strings(v3_ns->bw_file_headers, " ", 0, NULL); if (BUG(strlen(bw_file_headers) > MAX_BW_FILE_HEADERS_LINE_LEN)) { - /* Free and set to NULL, so the vote header line is empty */ + /* Free and set to NULL, because the line was too long */ tor_free(bw_file_headers); } } + if (!bw_file_headers) { + /* If parsing failed, add a bandwidth header line with no entries */ + bw_file_headers = tor_strdup(""); + } + /* At this point, the line will always be present */ + bw_headers_line = format_line_if_present("bandwidth-file-headers", + bw_file_headers); + tor_free(bw_file_headers); } smartlist_add_asprintf(chunks, @@ -300,7 +312,8 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, "dir-source %s %s %s %s %d %d\n" "contact %s\n" "%s" /* shared randomness information */ - "bandwidth-file-headers %s\n", /* bandwidth file headers */ + "%s" /* bandwidth file headers */ + , v3_ns->type == NS_TYPE_VOTE ? "vote" : "opinion", methods, published, va, fu, vu, @@ -317,15 +330,15 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key, voter->contact, shared_random_vote_str ? shared_random_vote_str : "", - bw_file_headers ? - bw_file_headers : ""); + bw_headers_line ? + bw_headers_line : ""); tor_free(params); tor_free(flags); tor_free(flag_thresholds); tor_free(methods); tor_free(shared_random_vote_str); - tor_free(bw_file_headers); + tor_free(bw_headers_line); if (!tor_digest_is_zero(voter->legacy_id_digest)) { char fpbuf[HEX_DIGEST_LEN+1]; @@ -4308,7 +4321,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, uint32_t addr; char *hostname = NULL, *client_versions = NULL, *server_versions = NULL; const char *contact; - smartlist_t *routers, *routerstatuses, *bw_file_headers; + smartlist_t *routers, *routerstatuses; char identity_digest[DIGEST_LEN]; char signing_key_digest[DIGEST_LEN]; int listbadexits = options->AuthDirListBadExits; @@ -4320,6 +4333,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, digestmap_t *omit_as_sybil = NULL; const int vote_on_reachability = running_long_enough_to_decide_unreachable(); smartlist_t *microdescriptors = NULL; + smartlist_t *bw_file_headers = NULL; tor_assert(private_key); tor_assert(cert); @@ -4392,7 +4406,6 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, routerstatuses = smartlist_new(); microdescriptors = smartlist_new(); - bw_file_headers = smartlist_new(); SMARTLIST_FOREACH_BEGIN(routers, routerinfo_t *, ri) { /* If it has a protover list and contains a protocol name greater than @@ -4458,6 +4471,8 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, /* This pass through applies the measured bw lines to the routerstatuses */ if (options->V3BandwidthsFile) { + /* Only set bw_file_headers when V3BandwidthsFile is configured */ + bw_file_headers = smartlist_new(); dirserv_read_measured_bandwidths(options->V3BandwidthsFile, routerstatuses, bw_file_headers); } else { From 6d59ab16a0aebf74b793c174f8e724b2fbcbbb64 Mon Sep 17 00:00:00 2001 From: juga0 Date: Sat, 21 Jul 2018 21:59:50 +0000 Subject: [PATCH 15/15] Add changes file regarding bandwidth file headers --- changes/ticket3723 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changes/ticket3723 diff --git a/changes/ticket3723 b/changes/ticket3723 new file mode 100644 index 0000000000..3deefe27b0 --- /dev/null +++ b/changes/ticket3723 @@ -0,0 +1,3 @@ + o Minor features (directory authority): + - When a bandwidth file is used to obtain the bandwidth measurements, + include this bandwidth file headers in the votes. Closes ticket 3723.