aboutsummaryrefslogtreecommitdiff
path: root/src/or/microdesc.c
Commit message (Expand)AuthorAge
* Add some debugging code to microdesc.[ch]Nick Mathewson2011-09-28
* Fix a crash bug in tor_assert(md->held_by_node)•••The fix is to turn held_by_node into a reference count. Fixes bug 4118; bugfix on 0.2.3.1-alpha. Nick Mathewson2011-09-28
* Make FetchUselessDescriptors fetch all desc types•••Previously, if you were set up to use microdescriptors, and you weren't a cache, you'd never fetch router descriptors (except for bridges). Now FetchUselessDescriptors causes descriptors and mirodescs to get cached. Also, FetchUselessDescriptors changes the behavior of "UseMicrodescriptors auto" to be off, since there's no point in saying "UseMicrodescriptors 1" when you have full descriptors too. Fix for bug 3851; bugfix on 0.2.3.1-alpha. Nick Mathewson2011-08-29
* Oops; _actually_ enable microdesc-by-default for clients•••It turns out that it wasn't enough to set the configuration to "auto", since the correct behavior for "auto" had been disabled in microdesc.c. :p (Hasn't been in a release yet, so doesn't need a changes entry.) Nick Mathewson2011-08-15
* Merge remote-tracking branch 'public/bug3153'•••Conflicts: src/or/nodelist.c Nick Mathewson2011-07-07
|\
| * Track where microdescs are referenced to prevent free errs•••On IRC, wanoskarnet notes that if we ever do microdesc_free() on a microdesc that's in the nodelist, we're in trouble. Also, we're in trouble if we free one that's still in the microdesc_cache map. This code adds a flag to microdesc_t to note where the microdesc is referenced from, and checks those flags from microdesc_free(). I don't believe we have any errors here now, but if we introduce some later, let's log and recover from them rather than introducing heisenbugs later on. Addresses bug 3153. Nick Mathewson2011-05-12
* | Make the get_options() return const•••This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output! Nick Mathewson2011-06-14
* | Merge remote-tracking branch 'public/bug3122_memcmp_023'Nick Mathewson2011-05-12
|\ \
| * | Hand-tune the new tor_memcmp instances in 0.2.3Nick Mathewson2011-05-11
| * | Reapply the automated memcmp conversion to 0.2.3 to catch newly added memcmpsNick Mathewson2011-05-11
| * | Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023•••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 Nick Mathewson2011-05-11
| |\ \ | | |/ | |/|
| | * Hand-tune the new tor_memcmp instances in 0.2.2Nick Mathewson2011-05-11
| | * Re-apply the automated conversion to 0.2.2 to make handle any memcmps that sn...Nick Mathewson2011-05-11
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-05-12
|\ \ \ | |/ / |/| |
| * | Unmap microdesc cache before replacing it.•••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. Nick Mathewson2011-05-12
| |/
* | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/or/connection.c Nick Mathewson2011-05-09
|\|
| * Fix a potential null deref when rebuilding md cache•••Issue discovered using clang's static analyzer Sebastian Hahn2011-05-09
* | Fix check-spaces issues in masterNick Mathewson2011-05-05
* | Make microdesc use off-by-default for now, since there are not enough cachesNick Mathewson2011-05-05
* | Code to make clients fetch and use microdescriptors for circuit building•••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. Nick Mathewson2011-05-05
* | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/or/main.c src/or/microdesc.c Nick Mathewson2011-05-03
|\|
| * Change who calls microdesc_cache_rebuild().•••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. Nick Mathewson2011-05-03
* | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/or/microdesc.c Nick Mathewson2011-05-03
|\|
| * Rebuild the microdesc cache when a sufficient number of bytes are dropped•••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. Nick Mathewson2011-05-03
| * Backport microdesc_cache_clean to 0.2.2•••Otherwise we have no way to keep authorities' microdesc caches in 0.2.2 from growing without bound. Nick Mathewson2011-05-03
* | Merge remote-tracking branch 'origin/maint-0.2.2'•••Conflicts: src/or/microdesc.c Nick Mathewson2011-05-03
|\|
| * Fix a check for when to rebuild the microdesc cache. (Backport from 0.2.3.Nick Mathewson2011-05-03
| * Add missing code to set cache->journal_len when reading microdesc journal•••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". Nick Mathewson2011-05-03
* | Fix memory leak in md-download logic•••Also fix some microdesc comments Fix for bug 2623 Nick Mathewson2011-02-24
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\|
| * Bump copyright statements to 2011 (0.2.2)Nick Mathewson2011-01-03
* | Merge branch 'nodes'Nick Mathewson2010-10-13
|\ \
| * | Implement policies for nodes (and for microdescriptors too)Nick Mathewson2010-10-01
| * | Initial conversion to use node_t throughout our codebase.•••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. Nick Mathewson2010-10-01
| * | Implement a basic node and nodelist type•••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. Nick Mathewson2010-10-01
* | | Add more documentation to microdesc.c, plus another assert.Nick Mathewson2010-10-07
* | | Add a more verbose log message to try to catch bug #2022.Nick Mathewson2010-10-07
* | | Unit tests for microdescriptor cache•••May help with tracking down bug #2022 Nick Mathewson2010-10-07
|/ /
* | Whitespace fixes on recent merges to master.Nick Mathewson2010-09-30
* | Clean long-unlisted microdescs from the cacheNick Mathewson2010-09-27
* | Download microdescriptors if you're a cache•••This commit adds some functions to see what microdescriptors we're missing, and adds fetch-microdesc/store-microdesc logic to the directory code. Nick Mathewson2010-09-27
|/
* Fix compilation with --with-dmalloc•••Fixes 1832; bugfix on 0.2.2.6-alpha Karsten Loesing2010-08-16
* Create routerparse.hSebastian Hahn2010-07-27
* Create microdesc.hSebastian Hahn2010-07-27
* Create config.hSebastian Hahn2010-07-27
* Update copyright dates for files not in maint-0.2.1Nick Mathewson2010-02-27
* Fix a memory corruption bug while collecting bridge stats•••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. Karsten Loesing2010-01-26
* Since dump_microdescriptor() can return -1; make its type ssize_tNick Mathewson2010-01-24
* Handle errors reported by fwrite() in dump_microdescriptor()•••Does not deal with error handling in dump_microdescriptor's callers. Peter Palfrader2010-01-24
* Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson2009-12-12