diff options
author | George Kadianakis <desnacked@riseup.net> | 2021-02-12 13:50:36 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2021-02-12 13:50:36 +0200 |
commit | 9fbedc74c3f3b26efdec7300e1cc41e7e2c23f49 (patch) | |
tree | 7be8ffc3d8becdbb3b62fa63456091b909831007 /src/feature/nodelist | |
parent | b64fe4bf55e57c19bb0ade5fc08d6500ac561019 (diff) | |
parent | 58b5300f4433f7cb741681a0501adba19af4ae6f (diff) | |
download | tor-9fbedc74c3f3b26efdec7300e1cc41e7e2c23f49.tar.gz tor-9fbedc74c3f3b26efdec7300e1cc41e7e2c23f49.zip |
Merge branch '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 5deec01f82..b283ea59f6 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)) { |