diff options
author | teor <teor@torproject.org> | 2019-06-24 19:47:34 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-06-24 19:47:34 +1000 |
commit | 872b85e689f978de79149c6f44ce4f0a76c6618a (patch) | |
tree | 97cf2a9a557c96970b2d2b32082f9ec99453e767 /src/feature | |
parent | 70415c9f729847a56e7feefe75e77b2cb96d4667 (diff) | |
parent | 8356cc5b514a5d6a0170927d7c3730e2e1164298 (diff) | |
download | tor-872b85e689f978de79149c6f44ce4f0a76c6618a.tar.gz tor-872b85e689f978de79149c6f44ce4f0a76c6618a.zip |
Merge branch 'bug30956_041' into bug30956_master
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/relay/router.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index e0daf34db2..25bb1835c2 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -3175,6 +3175,15 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo, published); smartlist_add(chunks, pre); + /* Add information about the pluggable transports we support, even if we + * are not publishing statistics. This information is needed by BridgeDB + * to distribute bridges. */ + if (options->ServerTransportPlugin) { + char *pluggable_transports = pt_get_extra_info_descriptor_string(); + if (pluggable_transports) + smartlist_add(chunks, pluggable_transports); + } + if (options->ExtraInfoStatistics && write_stats_to_extrainfo) { log_info(LD_GENERAL, "Adding stats to extra-info descriptor."); /* Bandwidth usage stats don't have their own option */ @@ -3182,6 +3191,7 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo, contents = rep_hist_get_bandwidth_lines(); smartlist_add(chunks, contents); } + /* geoip hashes aren't useful unless we are publishing other stats */ if (geoip_is_loaded(AF_INET)) smartlist_add_asprintf(chunks, "geoip-db-digest %s\n", geoip_db_digest(AF_INET)); @@ -3223,12 +3233,7 @@ extrainfo_dump_to_string(char **s_out, extrainfo_t *extrainfo, if (contents) smartlist_add(chunks, contents); } - /* Add information about the pluggable transports we support. */ - if (options->ServerTransportPlugin) { - char *pluggable_transports = pt_get_extra_info_descriptor_string(); - if (pluggable_transports) - smartlist_add(chunks, pluggable_transports); - } + /* bridge statistics */ if (should_record_bridge_info(options)) { const char *bridge_stats = geoip_get_bridge_stats_extrainfo(now); if (bridge_stats) { |