aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.h
AgeCommit message (Collapse)Author
2018-01-31remove the max_failures argument from download_status_is_ready.Nick Mathewson
2018-01-25Remove all the old max_delay logic.Nick Mathewson
We had tests for it, but it was always INT_MAX.
2018-01-25Remove the old ("deterministic") download schedule.Nick Mathewson
We haven't meant to use it since we introduced the random exponential schedule. Closes ticket 23814.
2017-12-08Fix wide lines introduced by previous patch.Nick Mathewson
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-11-17Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-17Intoduce unittest for skipping outdated dirservers.George Kadianakis
2017-11-17Merge branch 'bug23817_031' into maint-0.3.2Nick Mathewson
2017-11-17Introduce cache for outdated microdesc dirservers.George Kadianakis
We gonna use this cache to avoid dirservers without outdated md info.
2017-11-08Merge branch 'maint-0.3.2'Nick Mathewson
2017-11-08Merge branch 'bug23816_029_squashed' into maint-0.3.2Nick Mathewson
2017-11-08Replace our random-exponential-delay algorithm.Nick Mathewson
This patch has implementations of the "decorrelated" and "full" algorithms from https://www.awsarchitectureblog.com/2015/03/backoff.html
2017-10-25Add a unittest that reveals the offending case of #23862.George Kadianakis
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-09-05Merge branch 'http_tunnel_squashed'Nick Mathewson
2017-09-05Export http-command parsing functions.Nick Mathewson
2017-08-28Fix compilation warning on old clangs.George Kadianakis
2017-08-24prop224: Add directory_request_fetch_set_hs_ident()David Goulet
Needed by the client when fetching a descriptor. This function checks the directory purpose and hard assert if it is not for fetching. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24test: Add tests for fetching descs and handling SOCKS conns.George Kadianakis
- Add tests that ensure that SOCKS requests for v2/v3 addresses get intercepted and handled. - Add test that stores and lookups an HS descriptor in the client-side cache. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-24prop224: Add client code to handle fetched HS descriptors.George Kadianakis
This code handles received HS descriptors by storing them in the client-side HS cache. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08Do more type checking when setting HS idents.George Kadianakis
I repurposed the old directory_request_set_hs_ident() into a new directory_request_upload_set_hs_ident() which is only used for the upload purpose and so it can assert on the dir_purpose. When coding the client-side we can make a second function for fetch.
2017-08-08prop224: Directory function to upload descriptorDavid Goulet
This commit adds a directory command function to make an upload directory request for a service descriptor. It is not used yet, just the groundwork. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-07Merge branch 'bug17750_029_squashed'Nick Mathewson
2017-07-07Refactor exponential backoff multipliers into macrosteor
There are only so many times you can type "4".
2017-07-07Use download_status_get_next_attempt_at() more oftenteor
This guards against future occurrences of 17750.
2017-07-07Make clients try fallbacks before authoritiesteor
Make clients wait for 6 seconds before trying to download their consensus from an authority. Fixes bug 17750, bugfix on 0.2.8.1-alpha.
2017-05-22Log a warning if we receive a disallowed compression method for an anonymous ↵Alexander Færøy
connection. See: https://bugs.torproject.org/22305
2017-05-22Merge remote-tracking branch 'ahf/bugs/22305'Nick Mathewson
2017-05-22Ensure that only GZip and Zlib compression is handled for anonymous connections.Alexander Færøy
See: https://bugs.torproject.org/22305
2017-05-22Fix a compilation warning about duplicate typedefNick Mathewson
2017-05-22Set guard state on bridge descriptor fetches.George Kadianakis
We used to not set the guard state in launch_direct_bridge_descriptor_fetch(). So when a bridge descriptor fetch failed, the guard subsystem would never learn about the fail (and hence the guard's reachability state would not be updated).
2017-05-12Send "Accept-Encoding" to directory servers.Alexander Færøy
See: https://bugs.torproject.org/21667
2017-05-04New function to add additional headers to a directory requestNick Mathewson
2017-04-27Merge branch 'parse_accept_encoding'Nick Mathewson
2017-04-27Merge branch 'dirreq'Nick Mathewson
2017-04-25Tests for parse_accept_encodingNick Mathewson
2017-04-21Make directory_request_set_guard_state static.Nick Mathewson
2017-04-21Document the new directory_request_t API and add some assertionsNick Mathewson
2017-04-21Remove old directory_initiate_command_*() functions.Nick Mathewson
2017-04-21Have directory_get_from_all_authorities use requests.Nick Mathewson
2017-04-21continue refactoring directory API: remove initiate_command_rendNick Mathewson
This commit mainly moves the responsibility for directory request construction one level higher. It also allows a directory request to contain a pointer to a routerstatus, which will get turned into the correct contact information at the last minute.
2017-04-17Rename `zlib_compression_level_t` to `compression_level_t`.Alexander Færøy
See https://bugs.torproject.org/21663
2017-04-16Begin work to turn "directory request" into an objectNick Mathewson
This patch adds the object type, and makes all of the functions that used to feed into directory_initiate_command_rend() feed into that type instead.
2017-03-28Merge branch 'spooling_squashed'Nick Mathewson
2017-03-28Refactor the directory spool implementationNick Mathewson
The old implementation had duplicated code in a bunch of places, and it interspersed spool-management with resource management. The new implementation should make it easier to add new resource types and maintain the spooling code. Closing ticket 21651.
2017-03-15Run the copyright update script.Nick Mathewson
2017-01-30Restrict fuzzing to the directory headersteor
2016-12-19For fuzzing: Expose directory_handle_command.teor
(Nick extracted this patch from a larger patch by Teor.)
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.