mirror repository of the tor core protocol in case of issues
Go to file
David Goulet fa70aabb62 dirauth: Recalculate voting schedule at first vote
Commit e67f4441eb introduced a safeguard against
using an uninitialized voting schedule object. However, the dirvote_act() code
was looking roughly at the same thing to know if it had to compute the timings
before voting with this condition:

  if (!voting_schedule.voting_starts) {
    ...
    dirvote_recalculate_timing(options, now);
  }

The sr_init() function is called very early and goes through the safeguard
thus the voting schedule is always initilized before the first vote.

That first vote is a crucial one because we need to have our voting schedule
aligned to the "now" time we are about to use for voting. Then, the schedule
is updated when we publish our consensus or/and when we set a new consensus.
From that point on, we only want to update the voting schedule through that
code flow.

This "created_on_demand" is indicating that the timings have been recalculated
on demand by another subsystem so if it is flagged, we know that we need to
ignore its values before voting.

Fixes #24186

Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-11-08 14:46:49 -05:00
changes Merge remote-tracking branch 'dgoulet/bug23751_032_01' into maint-0.3.2 2017-11-08 10:56:33 -05:00
contrib Bump to 0.3.2.4-alpha 2017-11-07 13:22:27 -05:00
doc ClientDNSRejectInternalAddresses in non-default networks 2017-11-04 18:31:02 +01:00
m4 Replace obsolete macros with modern equivalents 2016-12-23 10:34:11 -05:00
scripts lintchanges: Allow 'fixes bugs a, b, and c' 2017-11-05 14:41:39 -05:00
src dirauth: Recalculate voting schedule at first vote 2017-11-08 14:46:49 -05:00
.gitignore Merge branch 'maint-0.3.1' 2017-09-19 13:08:59 -04:00
.gitlab-ci.yml Match .travis.yml more closely 2017-10-05 22:42:00 -05:00
.gitmodules Allow Rust build using locally supplied crates or crates.io 2017-05-19 08:47:11 -04:00
.travis.yml Merge branch 'maint-0.3.0' into maint-0.3.1 2017-07-26 15:39:56 -04:00
acinclude.m4 Run the copyright update script. 2017-03-15 16:13:17 -04:00
autogen.sh Report errors when updating configuration files 2016-12-23 10:35:26 -05:00
ChangeLog Fix a couple typos in the ChangeLog entries for 0.3.2.2-alpha. 2017-10-02 19:38:49 +00:00
configure.ac Bump to 0.3.2.4-alpha 2017-11-07 13:22:27 -05:00
Doxyfile.in doxygen says these options are obsolete 2016-10-24 10:31:05 -04:00
INSTALL Small fixes for the 2702 implementation 2011-04-02 12:15:08 +02:00
LICENSE Run the copyright update script. 2017-03-15 16:13:17 -04:00
Makefile.am Whoops; only run lintchanges when usepython 2017-09-21 17:32:17 -04:00
Makefile.nmake Clean up the MVSC nmake files so they work again. 2014-09-09 10:27:05 -04:00
README doc: Put the release timeline link in README 2017-11-08 10:44:00 -05:00
ReleaseNotes forward-port changelogs and release notes for 0.2.8.15, 0.2.9.12, 0.3.0.11, 0.3.1.7 2017-09-18 10:11:15 -04:00

Tor protects your privacy on the internet by hiding the connection
between your Internet address and the services you use. We believe Tor
is reasonably secure, but please ensure you read the instructions and
configure it properly.

To build Tor from source:
        ./configure && make && make install

To build Tor from a just-cloned git repository:
        sh autogen.sh && ./configure && make && make install

Home page:
        https://www.torproject.org/

Download new versions:
        https://www.torproject.org/download/download.html

Documentation, including links to installation and setup instructions:
        https://www.torproject.org/docs/documentation.html

Making applications work with Tor:
        https://wiki.torproject.org/projects/tor/wiki/doc/TorifyHOWTO

Frequently Asked Questions:
        https://www.torproject.org/docs/faq.html


To get started working on Tor development:
        See the doc/HACKING directory.

Release timeline:
         https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/CoreTorReleases