diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-01-25 15:28:58 +0100 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-10-26 22:09:44 +0200 |
commit | 908289894419b8fa331197948cb048f08ff5d035 (patch) | |
tree | 805f92941f2308ac1668cfe97a936948879191c7 /src/or | |
parent | d0a91386e5b85c5a0db3981a294c7a75192f9c3a (diff) | |
download | tor-908289894419b8fa331197948cb048f08ff5d035.tar.gz tor-908289894419b8fa331197948cb048f08ff5d035.zip |
Fix assert for relay/bridge state change
When we added support for separate client tls certs on bridges in
a2bb0bfdd5 we forgot to correctly initialize this when changing
from relay to bridge or vice versa while Tor is running. Fix that
by always initializing keys when the state changes.
Fixes bug 2433.
Conflicts:
src/or/config.c
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/config.c b/src/or/config.c index fbfa771ed3..7d7f2c38d8 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1371,11 +1371,12 @@ options_act(or_options_t *old_options) if (options_transition_affects_workers(old_options, options)) { log_info(LD_GENERAL, "Worker-related options changed. Rotating workers."); + + if (init_keys() < 0) { + log_warn(LD_BUG,"Error initializing keys; exiting"); + return -1; + } if (server_mode(options) && !server_mode(old_options)) { - if (init_keys() < 0) { - log_warn(LD_BUG,"Error initializing keys; exiting"); - return -1; - } ip_address_changed(0); if (has_completed_circuit || !any_predicted_circuits(time(NULL))) inform_testing_reachability(); @@ -3763,6 +3764,7 @@ options_transition_affects_workers(or_options_t *old_options, new_options->ServerDNSSearchDomains || old_options->SafeLogging != new_options->SafeLogging || old_options->ClientOnly != new_options->ClientOnly || + public_server_mode(old_options) != public_server_mode(new_options) || !config_lines_eq(old_options->Logs, new_options->Logs)) return 1; |