diff options
author | David Goulet <dgoulet@torproject.org> | 2021-01-14 09:42:56 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-01-14 09:42:56 -0500 |
commit | 743a5ef2b3781b593f5299758d0a7fc78b5816c4 (patch) | |
tree | cc7525792783a2018436a59467e3e0be126ef9f7 /src/feature/relay/relay_periodic.c | |
parent | e5a0c739d4865b300e904d45c413d5c8f0da304c (diff) | |
download | tor-743a5ef2b3781b593f5299758d0a7fc78b5816c4.tar.gz tor-743a5ef2b3781b593f5299758d0a7fc78b5816c4.zip |
relay: Don't flag that we published if descriptor build fails
In case building the descriptor would fail, we could still flag that we did in
fact publish the descriptors leading to no more attempt at publishing it which
in turn makes the relay silent for some hours and not try to rebuild the
descriptor later.
This has been spotted with #40231 because the operator used a localhost
address for the ORPort and "AssumeReachable 1" leading to this code path where
the descriptor failed to build but all conditions to "can I publish" were met.
Related to #40231
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/relay/relay_periodic.c')
-rw-r--r-- | src/feature/relay/relay_periodic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/feature/relay/relay_periodic.c b/src/feature/relay/relay_periodic.c index a857ea8d92..a917d90f1a 100644 --- a/src/feature/relay/relay_periodic.c +++ b/src/feature/relay/relay_periodic.c @@ -104,7 +104,7 @@ rotate_onion_key_callback(time_t now, const or_options_t *options) log_info(LD_GENERAL,"Rotating onion key."); rotate_onion_key(); cpuworkers_rotate_keyinfo(); - if (router_rebuild_descriptor(1)<0) { + if (!router_rebuild_descriptor(1)) { log_info(LD_CONFIG, "Couldn't rebuild router descriptor"); } if (advertised_server_mode() && !net_is_disabled()) |