summaryrefslogtreecommitdiff
path: root/src/feature
AgeCommit message (Collapse)Author
2020-02-11Merge branch 'ticket33029_042_01' into ticket33029_043_03David Goulet
Conflicts: doc/tor.1.txt src/app/config/config.c src/app/config/or_options_st.h src/core/mainloop/connection.h Between 042 and 043, the dirauth options were modularized so this merge commit address this by moving the AuthDirRejectUncompressedRequests to the module along with a series of accessors. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11dirauth: Rename function for better clarityDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11test: Add unit test for connection_dir_is_global_write_low()David Goulet
Part of #33029 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11dirlist: Add configured trusted dir to the nodelist address setDavid Goulet
The configured, within the torrc or hardcoded, directory authorities addresses are now added to the nodelist address set. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11nodelist: Helper to add an address to the nodelist address setDavid Goulet
We separate v4 and v6 because we often use an IPv4 address represented with a uint32_t instead of a tor_addr_t. This will be used to also add the trusted directory addresses taken from the configuration. The trusted directories from the consensus are already added to the address set from their descriptor. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11mainloop: Remove unused parameter from connection_dir_is_global_write_low()David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-11mainloop: Rename global_write_bucket_low()David Goulet
That function is only used to test the global bucket write limit for a directory connection. It should _not_ be used for anything else since that function looks to see if we are a directory authority. Rename it to something more meaningful. No change in behavior at this commit, only renaming. Part of #33029 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-10Merge branch 'bug33104_041'Nick Mathewson
2020-02-10stats: Fix a function comment typo in rephist.cteor
Comment-only change.
2020-02-06Merge branch 'bug33103'Nick Mathewson
2020-02-06hs-v3: Remove descriptor when we remove client authorizationDavid Goulet
When the ONION_CLIENT_AUTH_REMOVE command is given to tor, now also remove the descriptor associated with the client authorization credentials. Fixes #33148 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-05Fix a memory leak in handling GETINFO.Nick Mathewson
Fixes bug 33103; bugfix on 0.4.3.1-alpha.
2020-02-04Merge branch 'tor-github/pr/1704'George Kadianakis
2020-02-03hs-v3: Purge ephemeral client auth on NEWNYMDavid Goulet
Fixes #33139. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-30hs-v2: Turn logs into protocol warningDavid Goulet
All of those can be triggered remotely so change them to protocol warnings. Fixes #32706 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-30Rewrite control_event_signal() to use signal_table.Nick Mathewson
When we added the ACTIVE and DORMANT virtual signals, we taught the signal command to handle them, but we didn't teach SIGNAL event to report them. To solve this problem and prevent it from recurring, this patch revises the implementation of control_event_signal() to use the same signal_table that handle_control_signal() uses. This way, the two controller commands can't become out of sync. Fixes bug 33104; bugfix on 0.4.0.1-alpha.
2020-01-24fix leak in GETCONFTaylor Yu
Fix a memory leak introduced by refactoring of control reply formatting code. Fixes bug 33039; bugfix on 0.4.3.1-alpha.
2020-01-22Merge branch 'tor-github/pr/1677'David Goulet
2020-01-22Lower log level of standard error messages from PT's.Alexander Færøy
This patch lowers the log level of error messages from PT processes from warning to debug. See: https://bugs.torproject.org/33005
2020-01-22dir_connection_t: Explain dirconn_direct betterteor
Direct connections can use a DirPort or ORPort. Indirect connections must use a multi-hop Tor circuit. Comment-only changes.
2020-01-20Merge branch 'tor-github/pr/1668'David Goulet
2020-01-20Merge remote-tracking branch 'tor-github/pr/1673'teor
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-17Revert "Restore feature where nt-services detect non-"run_tor" modes."Nick Mathewson
This reverts commit 5c240db0bf7751d74ba438a1ca4ef0d051a53df7.
2020-01-17Merge branch 'ticket32806'Nick Mathewson
2020-01-17Remove some dead checksNick Mathewson
The only code that could set these options to be negative was in the unit tests.
2020-01-17fix a stray asterisk in a commentNick Mathewson
2020-01-17Merge branch 'ticket32487_squashed_and_merged'Nick Mathewson
2020-01-16Merge branch 'ticket32695_squashed'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-16Merge branch 'ticket32487_squashed' into ticket32487_squashed_and_mergedNick Mathewson
Resolved conflicts in src/core/include.am
2020-01-16Add have_module_dircache().Nick Mathewson
2020-01-16Turn several functions from stubs into macrosNick Mathewson
This may help the compiler eliminate deadcode.
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 directory_must_use_begindir() to dirclient_modes.[ch]Nick Mathewson
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-16Disable feature/dircache files when dircache module is disabled.Nick Mathewson
To make Tor still work, we define a minimal dircache_stub.c file that defines the entry points to the module that can actually be seen by the compiler when we're building with dircache and relay disabled.
2020-01-16Move dirserv_get_routerdescs() to control_getinfo.cNick Mathewson
This function had some XXX comments indicating (correctly) that it was not actually used by the dirserver code, and that only the controller still used it.
2020-01-16Move dir_split_resource_into_spoolable() to dircache module.Nick Mathewson
Only directory caches actually need to spool things.
2020-01-15Don't escape the bridge distribution value.Alexander Færøy
We already check if there are invalid values in check_bridge_distribution_setting() and reject the value if that is the case. We can therefore only have strings of [A-Z] | [a-z] | [0-9] | '-' | '_' here which is according to the directory specification. See: https://bugs.torproject.org/32753
2020-01-16add_c_file: Fix "control line not preceded by a blank line"teor
Fix dirauth and relay module include.am add_c_file.py "control line not preceded by a blank line" errors. Also remove a duplicate ADD_C_FILE: SOURCES in the relay module. Obviously correct fixes to already-reviewed code.
2020-01-15Remove "hyphae" as a known value for BridgeDistribution.Alexander Færøy
This patch removes hyphae as a known value for the BridgeDistribution option in torrc.
2020-01-15Merge remote-tracking branch 'tor-github/pr/1657'Nick Mathewson
2020-01-15Lowercase BridgeDistribution value before adding it to the descriptor.Alexander Færøy
This patch makes sure we lowercase the value of BridgeDistribution before we add it to the descriptor as `bridge-distribution-request`. See: https://bugs.torproject.org/32753