diff options
author | Roger Dingledine <arma@torproject.org> | 2016-11-13 02:39:16 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-10-24 19:26:24 -0400 |
commit | ebab5215252f9fa810ae091c335c5ae6e619faaf (patch) | |
tree | 1e4bd4e7751f48dd93d31de404014653a92d8d3b /src/or/config.c | |
parent | fcd5c3144a44f4081e9e7c4336b932e31ae45f77 (diff) | |
download | tor-ebab5215252f9fa810ae091c335c5ae6e619faaf.tar.gz tor-ebab5215252f9fa810ae091c335c5ae6e619faaf.zip |
Add new BridgeDistribution config option
Bridge relays can use it to add a "bridge-distribution-request" line
to their bridge descriptor, which tells BridgeDB how they'd like their
bridge address to be given out.
Implements tickets 18329.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 08cc5cdf57..1bdfdf4846 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -182,6 +182,7 @@ static config_var_t option_vars_[] = { V(BridgePassword, STRING, NULL), V(BridgeRecordUsageByCountry, BOOL, "1"), V(BridgeRelay, BOOL, "0"), + V(BridgeDistribution, STRING, NULL), V(CellStatistics, BOOL, "0"), V(LearnCircuitBuildTimeout, BOOL, "1"), V(CircuitBuildTimeout, INTERVAL, "0"), @@ -3346,6 +3347,10 @@ options_validate(or_options_t *old_options, or_options_t *options, options->DirPort_set = 0; } + if (options->BridgeDistribution && !options->BridgeRelay) { + REJECT("You have set BridgeDistribution, yet you didn't set BridgeRelay!"); + } + if (options->MinUptimeHidServDirectoryV2 < 0) { log_warn(LD_CONFIG, "MinUptimeHidServDirectoryV2 option must be at " "least 0 seconds. Changing to 0."); @@ -4497,6 +4502,8 @@ options_transition_affects_descriptor(const or_options_t *old_options, get_effective_bwburst(old_options) != get_effective_bwburst(new_options) || !opt_streq(old_options->ContactInfo, new_options->ContactInfo) || + !opt_streq(old_options->BridgeDistribution, + new_options->BridgeDistribution) || !opt_streq(old_options->MyFamily, new_options->MyFamily) || !opt_streq(old_options->AccountingStart, new_options->AccountingStart) || old_options->AccountingMax != new_options->AccountingMax || |