summaryrefslogtreecommitdiff
path: root/src/or/microdesc.c
AgeCommit message (Collapse)Author
2011-05-12Merge remote-tracking branch 'public/bug3122_memcmp_023'Nick Mathewson
2011-05-12Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-05-12Unmap microdesc cache before replacing it.Nick Mathewson
If we do a replace-then-munmap, windows will never actually rewrite the microdesc cache. Found by wanoskarnet; bugfix on 0.2.2.6-alpha.
2011-05-11Hand-tune the new tor_memcmp instances in 0.2.3Nick Mathewson
2011-05-11Reapply the automated memcmp conversion to 0.2.3 to catch newly added memcmpsNick Mathewson
2011-05-11Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023Nick Mathewson
Conflicts in various places, mainly node-related. Resolved them in favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022. src/common/Makefile.am src/or/circuitlist.c src/or/connection_edge.c src/or/directory.c src/or/microdesc.c src/or/networkstatus.c src/or/router.c src/or/routerlist.c src/test/test_util.c
2011-05-11Hand-tune the new tor_memcmp instances in 0.2.2Nick Mathewson
2011-05-11Re-apply the automated conversion to 0.2.2 to make handle any memcmps that ↵Nick Mathewson
snuck in
2011-05-09Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/or/connection.c
2011-05-09Fix a potential null deref when rebuilding md cacheSebastian Hahn
Issue discovered using clang's static analyzer
2011-05-05Fix check-spaces issues in masterNick Mathewson
2011-05-05Make microdesc use off-by-default for now, since there are not enough cachesNick Mathewson
2011-05-05Code to make clients fetch and use microdescriptors for circuit buildingNick Mathewson
To turn this on, set UseMicrodescriptors to "1" (or "auto" if you want it on-if-you're-a-client). It should go auto-by-default once 0.2.3.1-alpha is released. Because of our node logic, directory caches will never use microdescriptors when they have the right routerinfo available.
2011-05-03Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/or/main.c src/or/microdesc.c
2011-05-03Change who calls microdesc_cache_rebuild().Nick Mathewson
Previously we ensured that it would get called periodically by doing it from inside the code that added microdescriptors. That won't work though: it would interfere with our code that tried to read microdescs from disk initially. Instead, we should consider rebuilding the cache periodically, and on startup.
2011-05-03Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/or/microdesc.c
2011-05-03Rebuild the microdesc cache when a sufficient number of bytes are droppedNick Mathewson
Previously on 0.2.2, we'd never clean the cache. Now that we can clean it, we want to add a condition to rebuild it: that should happen whenever we have dropped enough microdescriptors that we could save a lot of space. No changes file, since 0.2.3 doesn't need one and 0.2.2 already has some changes files for the backport of the microdesc_clean_cahce() function.
2011-05-03Backport microdesc_cache_clean to 0.2.2Nick Mathewson
Otherwise we have no way to keep authorities' microdesc caches in 0.2.2 from growing without bound.
2011-05-03Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/or/microdesc.c
2011-05-03Fix a check for when to rebuild the microdesc cache. (Backport from 0.2.3.Nick Mathewson
2011-05-03Add missing code to set cache->journal_len when reading microdesc journalNick Mathewson
This could be one reason that authorities' journals would grow without bound; related to bug 2230. Bugfix on 0.2.2.6-alpha. Fix by "cypherpunks".
2011-02-24Fix memory leak in md-download logicNick Mathewson
Also fix some microdesc comments Fix for bug 2623
2011-01-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-01-03Bump copyright statements to 2011 (0.2.2)Nick Mathewson
2010-10-13Merge branch 'nodes'Nick Mathewson
2010-10-07Add more documentation to microdesc.c, plus another assert.Nick Mathewson
2010-10-07Add a more verbose log message to try to catch bug #2022.Nick Mathewson
2010-10-07Unit tests for microdescriptor cacheNick Mathewson
May help with tracking down bug #2022
2010-10-01Implement policies for nodes (and for microdescriptors too)Nick Mathewson
2010-10-01Initial conversion to use node_t throughout our codebase.Nick Mathewson
A node_t is an abstraction over routerstatus_t, routerinfo_t, and microdesc_t. It should try to present a consistent interface to all of them. There should be a node_t for a server whenever there is * A routerinfo_t for it in the routerlist * A routerstatus_t in the current_consensus. (note that a microdesc_t alone isn't enough to make a node_t exist, since microdescriptors aren't usable on their own.) There are three ways to get a node_t right now: looking it up by ID, looking it up by nickname, and iterating over the whole list of microdescriptors. All (or nearly all) functions that are supposed to return "a router" -- especially those used in building connections and circuits -- should return a node_t, not a routerinfo_t or a routerstatus_t. A node_t should hold all the *mutable* flags about a node. This patch moves the is_foo flags from routerinfo_t into node_t. The flags in routerstatus_t remain, but they get set from the consensus and should not change. Some other highlights of this patch are: * Looking up routerinfo and routerstatus by nickname is now unified and based on the "look up a node by nickname" function. This tries to look only at the values from current consensus, and not get confused by the routerinfo_t->is_named flag, which could get set for other weird reasons. This changes the behavior of how authorities (when acting as clients) deal with nodes that have been listed by nickname. * I tried not to artificially increase the size of the diff here by moving functions around. As a result, some functions that now operate on nodes are now in the wrong file -- they should get moved to nodelist.c once this refactoring settles down. This moving should happen as part of a patch that moves functions AND NOTHING ELSE. * Some old code is now left around inside #if 0/1 blocks, and should get removed once I've verified that I don't want it sitting around to see how we used to do things. There are still some unimplemented functions: these are flagged with "UNIMPLEMENTED_NODELIST()." I'll work on filling in the implementation here, piece by piece. I wish this patch could have been smaller, but there did not seem to be any piece of it that was independent from the rest. Moving flags forces many functions that once returned routerinfo_t * to return node_t *, which forces their friends to change, and so on.
2010-10-01Implement a basic node and nodelist typeNick Mathewson
The node_t type is meant to serve two key functions: 1) Abstracting difference between routerinfo_t and microdesc_t so that clients can use microdesc_t instead of routerinfo_t. 2) Being a central place to hold mutable state about nodes formerly held in routerstatus_t and routerinfo_t. This patch implements a nodelist type that holds a node for every router that we would consider using.
2010-09-30Whitespace fixes on recent merges to master.Nick Mathewson
2010-09-27Clean long-unlisted microdescs from the cacheNick Mathewson
2010-09-27Download microdescriptors if you're a cacheNick Mathewson
This commit adds some functions to see what microdescriptors we're missing, and adds fetch-microdesc/store-microdesc logic to the directory code.
2010-08-16Fix compilation with --with-dmallocKarsten Loesing
Fixes 1832; bugfix on 0.2.2.6-alpha
2010-07-27Create routerparse.hSebastian Hahn
2010-07-27Create microdesc.hSebastian Hahn
2010-07-27Create config.hSebastian Hahn
2010-02-27Update copyright dates for files not in maint-0.2.1Nick Mathewson
2010-01-26Fix a memory corruption bug while collecting bridge statsKarsten Loesing
We accidentally freed the internal buffer for bridge stats when we were writing the bridge stats file or honoring a control port request for said data. Change the interfaces for geoip_get_bridge_stats* to prevent these problems, and remove the offending free/add a tor_strdup. Fixes bug 1208.
2010-01-24Since dump_microdescriptor() can return -1; make its type ssize_tNick Mathewson
2010-01-24Handle errors reported by fwrite() in dump_microdescriptor()Peter Palfrader
Does not deal with error handling in dump_microdescriptor's callers.
2009-12-12Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson
2009-10-19Fix compile with warnings problems on Snow LeopardSebastian Hahn
2009-10-18Add functions to serve microdescs and flavored consensuses.Nick Mathewson
2009-10-18Document the microdescriptor code better.Nick Mathewson
2009-10-18Fix various bugs in microdescriptor caching.Nick Mathewson
2009-10-15Code to generate, store, and parse microdescriptors and consensuses.Nick Mathewson
The consensus documents are not signed properly, not served, and not exchanged yet.