aboutsummaryrefslogtreecommitdiff
path: root/src/feature/nodelist/networkstatus.c
AgeCommit message (Collapse)Author
2020-09-28Add missing documentation for get_net_param_from_listNick Mathewson
2020-07-14Merge branch 'ticket40033_045_01_squashed'Nick Mathewson
2020-07-14Rename blacklist and whitelist wordingDavid Goulet
Closes #40033 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-24Add two new networkstatus parameters to emulate AssumeReachable.Nick Mathewson
These parameters do not suppress checks, but they tell relays that it's okay to publish even when those checks fail. I have chosen lowercase hyphenated names, since these seem to be more common in networkstatus params. Closes #33224 and part of #34064.
2020-06-24Move code into notify_after_networkstatus_changes().Nick Mathewson
The purpose of having this function was to inform other code that the consensus has changed, so it should go there.
2020-03-27spell consensus more right in commentsRoger Dingledine
2020-02-24Rename voting_schedule_*() functions.Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ voting_schedule_recalculate_timing dirauth_sched_recalculate_timing \ voting_schedule_get_start_of_next_interval voting_sched_get_start_of_interval_after \ voting_schedule_get_next_valid_after_time dirauth_sched_get_next_valid_after_time
2020-02-24Move one voting schedule fn into networkstatus.cNick Mathewson
The 'voting_schdule_get_start_of_next_interval' function isn't actually dirauth-specific.
2020-02-24Move voting_schedule.[ch] to src/feature/dirauth/Nick Mathewson
2020-02-12Run "make autostyle".Nick Mathewson
2020-01-20Merge branch 'ticket20218_rebased_squashed' into ticket20218_mergedteor
* ticket 32695 removed networkstatus_consensus_has_ipv6(), keep that change in master. * ticket 20218 modifies the function name and comment for routerstatus_has_visibly_changed(), keep that change in ticket20218_rebased_squashed.
2020-01-20split a wide lineNick Mathewson
2020-01-20Rename routerstatus_has_changed to routerstatus_has_visibly_changedNick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ routerstatus_has_changed routerstatus_has_visibly_changed It was generated with --no-verify, since it introduces a wide line. I'll fix it in a subsequent commit.
2020-01-17Merge branch 'ticket32487_squashed_and_merged'Nick Mathewson
2020-01-16Remove functions that checked for pre-ipv6 consensus.Nick Mathewson
We no longer need or need to test: * node_awaiting_ipv6() * networkstatus_consensus_has_ipv6().
2020-01-16Remove routerstatus_format_entry() consensus_method argument as unusedNick Mathewson
2020-01-16Remove support for now-obsolete consensus methods before 28.Nick Mathewson
Closes ticket 32695.
2020-01-16expose routerstatus_has_changed to unit tests.Nick Mathewson
2020-01-16Refactor routerstatus_has_changed functionVictor Nepveu
- Check all fields that might change in a routerstatus - Document the refactoring Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
2020-01-16Rename dirclient_modes.h identifiers to start with dirclient_Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ directory_must_use_begindir dirclient_must_use_begindir \ directory_fetches_from_authorities dirclient_fetches_from_authorities \ directory_fetches_dir_info_early dirclient_fetches_dir_info_early \ directory_fetches_dir_info_later dirclient_fetches_dir_info_later \ directory_too_idle_to_fetch_descriptors dirclient_too_idle_to_fetch_descriptors
2020-01-16Move dirclient-related functions out of dirserv, and reenable themNick Mathewson
I had incorrectly identified these functions as dircache-only, when in fact they apply to everyone who acts a directory client.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-10-21control: Add GETINFO support for dumping microdesc consensusAmreshVenugopal
- Allows control port to read microdesc consensus using: GETINFO dir/status-vote/microdesc/consensus add: Helper function `getinfo_helper_current_consensus` test: check if GETINFO commands return expected consensus data. Resolves 31684.
2019-08-06hs-v3: Add consensus parameters for DoS defensesDavid Goulet
Part of #15516 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-02Move voteflags.[ch] to become dirauth only.Nick Mathewson
For various reasons, this was a nontrivial movement. There are several places in the code where we do something like "update the flags on this routerstatus or node if we're an authority", and at least one where we pretended to be an authority when we weren't.
2019-04-30Merge branch 'maint-0.4.0'George Kadianakis
2019-04-30Merge branch 'tor-github/pr/993'George Kadianakis
2019-04-30Move dirauth periodic events into dirauth module.Nick Mathewson
Closes ticket 30294.
2019-04-25Merge remote-tracking branch 'tor-github/pr/889'Nick Mathewson
2019-04-25Lower log level of unlink() errors in networkstatus_set_current_consensus().Alexander Færøy
In this patch we lower the log level of the failures for the three calls to unlink() in networkstatus_set_current_consensus(). These errors might trigger on Windows because the memory mapped consensus file keeps the file in open state even after we have close()'d it. Windows will then error on the unlink() call with a "Permission denied" error. The consequences of ignoring these errors is that we leave an unused file around on the file-system, which is an easier way to fix this problem right now than refactoring networkstatus_set_current_consensus(). See: https://bugs.torproject.org/29930
2019-04-11Update networkstatus_getinfo_by_purpose() commentNeel Chauhan
2019-04-11Remove callback for setting bridges as runningNeel Chauhan
2019-04-09Merge branch 'maint-0.4.0'teor
2019-04-03Stop setting bridges running in networkstatus_getinfo_by_purpose()Neel Chauhan
2019-04-03Improve logging for 28614.Nick Mathewson
When we fixed 28614, our answer was "if we failed to load the consensus on windows and it had a CRLF, retry it." But we logged the failure at "warn", and we only logged the retry at "info". Now we log the retry at "notice", with more useful information. Fixes bug 30004.
2019-03-25Split all controller events code into a new control_events.cNick Mathewson
Also, split the formatting code shared by control.c and control_events.c into controller_fmt.c.
2019-02-20fix typos from #28614Roger Dingledine
2019-02-12On windows, if we fail to load a consensus and it has a CRLF, retry.Nick Mathewson
Fixes bug 28614; bugfix on 0.4.0.1-alpha when we started mmapping the consensus.
2019-01-29Write consensus files in binary modeNick Mathewson
This will help us out on windows now that we mmap files. Fixes part of ticket 28614.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-14Merge remote-tracking branch 'asn-github/adaptive_padding-final'Nick Mathewson
2019-01-09Merge branch 'bug28591_035_squashed'Nick Mathewson
2019-01-02Initialize circuit padding machines and global state.Mike Perry
Co-authored-by: George Kadianakis <desnacked@riseup.net>
2018-12-11Merge remote-tracking branch 'github/prop297'Nick Mathewson
2018-12-05Merge branch 'prop293_squashed'Nick Mathewson
2018-12-05Write tests for mark_my_descriptor_dirty_if_too_old()Nick Mathewson
2018-12-01Merge remote-tracking branch 'tor-github/pr/536'Nick Mathewson
2018-11-29Dir: when Tor's clock is behind, use a future consensus to bootstrapteor
When Tor's clock is behind the clocks on the authorities, allow Tor to bootstrap successfully. Fixes bug 28591; bugfix on 0.2.0.9-alpha.