diff options
author | George Kadianakis <desnacked@riseup.net> | 2021-02-12 13:44:03 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2021-02-12 13:44:03 +0200 |
commit | 58b5300f4433f7cb741681a0501adba19af4ae6f (patch) | |
tree | 2048616add31728785858ce116abc63ccabe1387 /src/feature/nodelist | |
parent | 758000aa98432414847393420324fef983c66f1e (diff) | |
parent | 56f1cab9c12349538c5526de92d6e64fecb81184 (diff) | |
download | tor-58b5300f4433f7cb741681a0501adba19af4ae6f.tar.gz tor-58b5300f4433f7cb741681a0501adba19af4ae6f.zip |
Merge remote-tracking branch 'tor-gitlab/mr/295' into maint-0.4.5
Diffstat (limited to 'src/feature/nodelist')
-rw-r--r-- | src/feature/nodelist/networkstatus.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c index ece3c9e059..80940e6092 100644 --- a/src/feature/nodelist/networkstatus.c +++ b/src/feature/nodelist/networkstatus.c @@ -2723,6 +2723,13 @@ networkstatus_check_required_protocols(const networkstatus_t *ns, const bool consensus_postdates_this_release = ns->valid_after >= tor_get_approx_release_date(); + if (! consensus_postdates_this_release) { + // We can't meaningfully warn about this case: This consensus is from + // before we were released, so whatever is says about required or + // recommended versions may no longer be true. + return 0; + } + tor_assert(warning_out); if (client_mode) { @@ -2740,7 +2747,7 @@ networkstatus_check_required_protocols(const networkstatus_t *ns, "%s on the Tor network. The missing protocols are: %s", func, missing); tor_free(missing); - return consensus_postdates_this_release ? 1 : 0; + return 1; } if (! protover_all_supported(recommended, &missing)) { |