summaryrefslogtreecommitdiff
path: root/src/or/rendcache.c
AgeCommit message (Collapse)Author
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.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
2018-06-18Merge branch 'split_or_h'Nick Mathewson
2018-06-15Move extend_info_t into its own header.Nick Mathewson
2018-06-15Extract rend_intro_point_t into its own header.Nick Mathewson
2018-06-15Extract rend_service_descriptor_t into its own header.Nick Mathewson
2018-05-30Refrain from mentioning old bug in a warningrl1987
2018-02-07more fixes for typos, grammar, whitespace, etcRoger Dingledine
some of these ought to have been noticed by the "misspell" tool, so if anybody is debugging it, here are some bug reports :)
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2017-12-08Switch to a safer FREE_AND_NULL implementationNick Mathewson
This one only evaluates the input once, so it cannot mess up even if there are side effects.
2017-12-08Change the free macro convention in the rest of src/or/*.hNick Mathewson
2017-08-30prop224: Purge client state on NEWNYMDavid Goulet
Closes #23355 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-19prop224: Refactor parse_extended_hostname() to parse v3 addrs.George Kadianakis
We need this func so that we recognize SOCKS conns to v3 addresses. - Also rename rend_valid_service_id() to rend_valid_v2_service_id() - Also move parse_extended_hostname() tests to their own unittest, and add a v3 address to the test as well. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-03-15Run the copyright update script.Nick Mathewson
2016-12-19Merge branch 'maint-0.2.9'Nick Mathewson
2016-12-19Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2016-12-19Merge branch 'bug21018_024' into maint-0.2.8Nick Mathewson
2016-11-04prop224: Directory cache supportDavid Goulet
This implements the proposal 224 directory descriptor cache store and lookup functionalities. Furthermore, it merges the OOM call for the HSDir cache with current protocol v2 and the new upcoming v3. Add hs_cache.{c|h} with store/lookup API. Closes #18572 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-04hs: Refactor rend_data_t for multi version supportDavid Goulet
In order to implement proposal 224, we need the data structure rend_data_t to be able to accomodate versionning that is the current version of hidden service (2) and the new version (3) and future version. For that, we implement a series of accessors and a downcast function to get the v2 data structure. rend_data_t becomes a top level generic place holder. The entire rend_data_t API has been moved to hs_common.{c|h} in order to seperate code that is shared from between HS versions and unshared code (in rendcommon.c). Closes #19024 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-06-12typo/comment/log fixes i found in my sandbox from montrealRoger Dingledine
2016-03-26Do not treat "DOCDOC" as doxygen.Nick Mathewson
2016-03-16Bridges now refuse "rendezvous2" publish attemptsRoger Dingledine
Suggested during review of ticket 18332.
2016-03-11simplify rend_cache_store_status_t back to a booleanRoger Dingledine
it used to be a tri-state, but now it's just a bi-state, so we can take out all the machinery like the enum.
2016-03-11rip out hid_serv_acting_as_directory()Roger Dingledine
When we made HidServDirectoryV2 always 1, we removed the situation where a relay could choose not to be an HSDir. Now simplify the rest of the code to reflect this decision. (We have to remove two apparently unrelated free() calls in the unit tests, since they used to free stuff that we created as a side effect of calling router_get_my_routerinfo(), and now we no longer call that.)
2016-03-11rip out hid_serv_responsible_for_desc_id()Roger Dingledine
This simplifies relay behavior, because the relay offers the hsdir functionality independent of whether the directory authorities have decided this relay is suitable for clients to use yet. Implements ticket 18332.
2016-03-11moving hid_serv_get_responsible_directories and hid_serv_acting_as_directory ↵Hassan Alsibyani
from routerlist.c to rendcommon.c
2016-02-27Update the copyright year.Nick Mathewson
2015-12-09Mention the expected length of the digestscypherpunks
Some functions that use digest maps did not mention that the digests are expected to have DIGEST_LEN bytes. This lead to buffer over-reads in the past.
2015-10-21Merge remote-tracking branch 'origin/maint-0.2.7'Nick Mathewson
2015-10-21Whoops; infinite recursionNick Mathewson
2015-10-21Merge remote-tracking branch 'origin/maint-0.2.7'Nick Mathewson
2015-10-21Yet more memory leaks in the rendcache testsNick Mathewson
2015-10-21Fix memory leak in rend_cache_failure_entry_free()Nick Mathewson
Bug 17402.
2015-10-21Merge remote-tracking branch 'origin/maint-0.2.7'Nick Mathewson
2015-10-21Fix an (unreachable) memory leak in rendcache.cNick Mathewson
The 0.2.8 unit tests provoke this leak, though I don't think it can happen IRL.
2015-10-21Merge remote-tracking branch 'origin/maint-0.2.7'Nick Mathewson
2015-10-21Fix a bunch more memory leaks in the tests.Nick Mathewson
2015-10-21Fix a use-after-free in validate_intro_point_failure. Bug 17401. Found w ↵Nick Mathewson
valgrind
2015-10-06Merge remote-tracking branch 'twstrike/rendcache_tests'Nick Mathewson
Conflicts: src/test/include.am src/test/rend_test_helpers.c src/test/rend_test_helpers.h
2015-10-02Merge remote-tracking branch 'donncha/feature14846_4'Nick Mathewson
2015-09-15Add tests for the rend cacheOla Bini
2015-09-11Add a rend cache failure info dup functionDavid Goulet
When validating a new descriptor against our rend cache failure, we were added the failure entry to the new cache entry without duplicating. It was then freed just after the validation ending up in a very bad memory state that was making tor abort(). To fix this, a dup function has been added and used just before adding the failure entry. Fixes #17041 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-09-08Separate lookup function for service rend cacheDonncha O'Cearbhaill
Performing lookups in both the client and service side descriptor caches from the same rend_cache_lookup_entry() function increases the risk of accidental API misuse. I'm separating the lookup functions to keep the caches distinct.
2015-09-08Rename rend_cache_service to rend_cache_local_service for clarityDonncha O'Cearbhaill
2015-09-08Clean old descriptors from the service-side rend cacheDonncha O'Cearbhaill
Parameterize the rend_cache_clean() function to allow it clean old rendezvous descriptors from the service-side cache as well as the client descriptor cache.
2015-09-08Require explict specification of cache typeDonncha O'Cearbhaill
2015-09-08Clean up service-side descriptor cache and fix potential double-free.Donncha O'Cearbhaill
Entries in the service-side descriptor cache are now cleaned when rend_cache_free_all() is called. The call to tor_free(intro_content) in rend_cache_store_v2_desc_as_service() is moved to prevent a potential double-free when a service has a descriptor with a newer timestamp already in it's service-side descriptor cache.
2015-09-08Specify descriptor cache type in rend_cache_lookup_entry()Donncha O'Cearbhaill
Adds an Enum which represents the different types of rendezvous descriptor caches. This argument is passed in each call to rend_cache_lookup_entry() to specify lookup in the client-side or service-side descriptor caches.
2015-08-25Create a service-side descriptor cacheDonncha O'Cearbhaill
Adds a service descriptor cache which is indexed by service ID. This descriptor cache is used to store service descriptors generated by a local rendevous service. The service-side cach can be queried by calling rend_cache_lookup_entry() with the 'service' argument set to 1.