summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_common.c
AgeCommit message (Collapse)Author
2021-01-12Merge branch 'ticket40237_043_01' into ticket40237_044_01David Goulet
2021-01-12Merge branch 'ticket40237_035_01' into ticket40237_043_01David Goulet
2021-01-12hs-v3: Require reasonably live consensusDavid Goulet
Some days before this commit, the network experienced a DDoS on the directory authorities that prevented them to generate a consensus for more than 5 hours straight. That in turn entirely disabled onion service v3, client and service side, due to the subsystem requiring a live consensus to function properly. We know require a reasonably live consensus which means that the HSv3 subsystem will to its job for using the best consensus tor can find. If the entire network is using an old consensus, than this should be alright. If the service happens to use a live consensus while a client is not, it should still work because the client will use the current SRV it sees which might be the previous SRV for the service for which it still publish descriptors for. If the service is using an old one and somehow can't get a new one while clients are on a new one, then reachability issues might arise. However, this is a situation we already have at the moment since the service will simply not work if it doesn't have a live consensus while a client has one. Fixes #40237 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-28Introduce an hs_ob_free_all() function.George Kadianakis
2020-01-21Turn hs_subcredential_t into a proper struct.Nick Mathewson
2020-01-21hs-v3: Implement hs_parse_address_no_log()David Goulet
The hs_parse_address() can not be used without an options_t object existing since on error it uses the escaped_safe_str() that looks at the options. This new function won't log and returns an error message in case of failure that can then be used to log. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-11-07Fix various doxygen comments in feature/hs.Nick Mathewson
2019-10-16hs_common.[ch]: repair doxygen comments by replacing /* with /**Nick Mathewson
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-08-06hs-v3: Add consensus parameters for DoS defensesDavid Goulet
Part of #15516 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-05-15fix typos, whitespace, commentsRoger Dingledine
2019-05-10Merge branch 'tor-github/pr/973'George Kadianakis
2019-04-30Replace all remaining tor_mem_is_zero() with fast_mem_is_zero()Nick Mathewson
2019-04-24Add firewall_choose_address_ls() and hs_get_extend_info_from_lspecs() testsNeel Chauhan
2019-04-24Use fascist_firewall_choose_address_ls() in hs_get_extend_info_from_lspecs()Neel Chauhan
2019-04-23Rename outvar to follow _out convention.Nick Mathewson
2019-04-19Initialize rate_limited in hs_pick_hsdir() to falseNeel Chauhan
2019-04-19Only set rate_limited in hs_pick_hsdir() if rate_limited_count or ↵Neel Chauhan
responsible_dirs_count is greater than 0
2019-04-19Make rate_limited and is_rate_limited a boolNeel Chauhan
2019-04-11Make repeated/rate limited HSFETCH queries fail with QUERY_RATE_LIMITEDNeel Chauhan
2019-03-12Merge branch 'bug23576-041-rebased-squashed'Nick Mathewson
2019-03-12hs: abolish hs_desc_link_specifier_dup()teor
The previous commits introduced link_specifier_dup(), which is implemented using trunnel's opaque interfaces. So we can now remove hs_desc_link_specifier_dup(). Cleanup after bug 22781.
2019-03-12hs: abolish hs_desc_link_specifier_tteor
The previous commits for 23576 confused hs_desc_link_specifier_t and link_specifier_t. Removing hs_desc_link_specifier_t fixes this confusion. Fixes bug 22781; bugfix on 0.3.2.1-alpha.
2019-02-26Merge branch 'tor-github/pr/611'George Kadianakis
2019-01-31hs: Onion services put IPv6 addresses in service descriptorsteor
Rewrite service_intro_point_new() to take a node_t. Since node_get_link_specifier_smartlist() supports IPv6 link specifiers, this refactor adds IPv6 addresses to onion service descriptors. Part of 23576, implements 26992.
2019-01-17Fix users of base32_decode to check for expected length in return.Nick Mathewson
Also, when we log about a failure from base32_decode(), we now say that the length is wrong or that the characters were invalid: previously we would just say that there were invalid characters. Follow-up on 28913 work.
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2018-10-15Merge branch 'maint-0.3.4'Nick Mathewson
2018-09-25Revise things that had included router.h beforeNick Mathewson
Make them only include the headers that they needed, and sort their headers while we're at it.
2018-09-15Save original virtual port in edge conn HS ident.George Kadianakis
2018-07-30fix wrong word in commentRoger Dingledine
2018-07-20Tweak assertion in get_time_period_length() for coverityNick Mathewson
This is another attempt to fix 1437668. The assertion here should be safe, since the rules of networkstatus_get_param() keep the value it returns in range.
2018-07-17Merge branch 'bug25552_ope_squashed'Nick Mathewson
2018-07-05Fix every include path changed in the previous commit (automated)Nick Mathewson
I am very glad to have written this script.
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.