aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendcache.h
AgeCommit message (Collapse)Author
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
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-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-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-03-15Run the copyright update script.Nick 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-06-11Add -Wmissing-variable-declarations, with attendant fixesNick Mathewson
This is a big-ish patch, but it's very straightforward. Under this clang warning, we're not actually allowed to have a global variable without a previous extern declaration for it. The cases where we violated this rule fall into three roughly equal groups: * Stuff that should have been static. * Stuff that was global but where the extern was local to some other C file. * Stuff that was only global when built for the unit tests, that needed a conditional extern in the headers. The first two were IMO genuine problems; the last is a wart of how we build tests.
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-02-27Update the copyright year.Nick Mathewson
2015-10-21Yet more memory leaks in the rendcache testsNick Mathewson
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-05Fix spaces and other smaller issuesOla Bini
2015-09-15Add tests for the rend cacheOla Bini
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-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-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.
2015-08-11Expire after 5 minutes rend cache failure entriesDavid Goulet
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-08-11Add created timestamp to a rend cache failure entryDavid Goulet
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-08-11Use an enum for INTRO_POINT_FAILURE_*David Goulet
Safer, wiser, stronger! Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-08-11Purge client HS failure cache on NEWNYMDavid Goulet
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-08-11Add rend failure cacheDavid Goulet
When fetching a descriptor, we know test every introduction points in it against our rend failure cache to know if we keep it or not. For this to work, now everytime an introduction points is discareded (ex: receiving a NACK), we note it down in our introduction cache. See rendcache.c for a detailed explanation of the cache's behavior. Fixes #16389 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-07-16Break some wide linesNick Mathewson
2015-07-16Fix most check-spaces issuesNick Mathewson
2015-06-18Move cache objects and functions to rendcache.{c|h}David Goulet
Every functions and objects that are used for hidden service descriptor caches are moved to rendcache.{c|h}. This commit does NOT change anything, just moving code around. Fixes #16399 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-06-18Add rendcache.{c|h}David Goulet
For now, rend_cache_entry_t has been moved from or.h to rendcache.h and those files have been added to the build system. In the next commit, these will contain hidden service descriptor cache ABI and API for both client and directory side. The goal is to consolidate the descriptor caches in one location to ease development, maintenance, review and improve documentation for each cache behavior and algorithm. Signed-off-by: David Goulet <dgoulet@ev0ke.net>