aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.h
Commit message (Collapse)AuthorAge
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Exits don't need to fetch certs for unknown authoritiesNick Mathewson2012-03-30
| | | | | | | | | | | | | | | When we started RefuseUnknownExits back in 0.2.2.11-alpha, we started making exits act like they cache directory info (since they need an up-to-date idea of who is really a router). But this included fetching needless (unrecognized) authorities' certs, which doesn't make any sense for them. This is related to, but not necessarily the same as, the issue that Ian reported for bug #2297. (This patch is based on a patch from a user who I believe has asked not to be named. If I'm wrong about that, please add the appropriate name onto the changelog.)
* simplify furtherRoger Dingledine2012-03-29
|
* Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
* Make the get_options() return constNick Mathewson2011-06-14
| | | | | | | | 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!
* Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-03-14
|\ | | | | | | | | | | | | Fix trivial add/add conflict in main.c Conflicts: src/or/main.c
| * Tweak bug2716 patch a littleNick Mathewson2011-03-12
| | | | | | | | | | | | | | | | | | Name the magic value "10" rather than re-deriving it. Comment more. Use the pattern that works for periodic timers, not the pattern that doesn't work. ;)
| * improve accuracy for when a relay went unreachableRoger Dingledine2011-03-11
| |
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\|
| * Bump copyright statements to 2011 (0.2.2)Nick Mathewson2011-01-03
| |
* | Initial conversion to use node_t throughout our codebase.Nick Mathewson2010-10-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Try to make most routerstatus_t interfaces constNick Mathewson2010-10-01
| |
* | Try to make most routerinfo_t interfaces constNick Mathewson2010-10-01
|/
* Merge branch 'bug911'Nick Mathewson2010-09-14
|\
| * Move code for launching tests out of router_add_to_routerlist()Nick Mathewson2010-08-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | router_add_to_routerlist() is supposed to be a nice minimal function that only touches the routerlist structures, but it included a call to dirserv_single_reachability_test(). We have a function that gets called _after_ adding descriptors successfully: routerlist_descriptors_added. This patch moves the responsibility for testing there. Because the decision of whether to test or not depends on whether there was an old routerinfo for this router or not, we have to first detect whether we _will_ want to run the tests if the router is added. We make this the job of routers_update_status_from_consensus_networkstatus(). Finally, this patch makes the code notice if a router is going from hibernating to non-hibernating, and if so causes a reachability test to get launched.
* | Remove unused function declarationsSebastian Hahn2010-08-17
|/ | | | | | Also remove some #if 0'd code from the unit tests for buffers. The code was killed in e6794e58081af773073c266e23fe3ab2ebecdb7e (5 years ago), and is now broken anyways.
* Create dirserv.hSebastian Hahn2010-07-27