aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
Commit message (Expand)AuthorAge
* Implement policies for nodes (and for microdescriptors too)Nick Mathewson2010-10-01
* Rename routerstatus_t.is_running to is_flagged_running•••This was the only flag in routerstatus_t that we would previously change in a routerstatus_t in a consensus. We no longer have reason to do so -- and probably never did -- as you can now confirm more easily than you could have done by grepping for is_running before this patch. The name change is to emphasize that the routerstatus_t is_running flag is only there to tell you whether the consensus says it's running, not whether it *you* think it's running. 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
* Remove the has_old_dnsworkers flag.Nick Mathewson2010-09-28
* Actually parse the m lines from a microdesc consensusNick Mathewson2010-09-27
* Create routerparse.hSebastian Hahn2010-07-27
* Create rephist.hSebastian Hahn2010-07-27
* Create policies.hSebastian Hahn2010-07-27
* Create networkstatus.hSebastian Hahn2010-07-27
* Create microdesc.hSebastian Hahn2010-07-27
* Create dirvote.hSebastian Hahn2010-07-27
* Create dirserv.hSebastian Hahn2010-07-27
* Create config.hSebastian Hahn2010-07-27
* Create rendcommon.hSebastian Hahn2010-07-27
* Create routerlist.hSebastian Hahn2010-07-27
* Create router.hSebastian Hahn2010-07-27
* Merge branch 'fix_routerparse_bug'Nick Mathewson2010-02-28
|\
| * Fix a consensus-extension bug found by outofwords•••When the bandwidth-weights branch added the "directory-footer" token, and began parsing the directory footer at the first occurrence of "directory-footer", it made it possible to fool the parsing algorithm into accepting unsigned data at the end of a consensus or vote. This patch fixes that bug by treating the footer as starting with the first "directory-footer" or the first "directory-signature", whichever comes first. Nick Mathewson2010-02-27
* | Merge remote branch 'origin/maint-0.2.1'•••Conflicts: src/common/test.h src/or/test.c Nick Mathewson2010-02-27
|\ \ | |/ |/|
| * Update Tor Project copyright yearsNick Mathewson2010-02-27
* | fix some wide lines in routerparse.cNick Mathewson2010-02-27
* | Merge remote branch 'origin/maint-0.2.1'•••Conflicts: ChangeLog src/or/routerparse.c Nick Mathewson2010-02-27
|\|
| * Properly handle non-terminated strings•••Treat strings returned from signed_descriptor_get_body_impl() as not NUL-terminated. Since the length of the strings is available, this is not a big problem. Discovered by rieo. Sebastian Hahn2010-02-27
| * Code to parse and access network parameters.•••Partial backport of 381766ce4b1145460. Partial backport of 56c6d78520a98fb64. Nick Mathewson2009-10-14
* | Don't segfault when checking the consensusSebastian Hahn2010-02-26
* | Don't believe unauthenticated info in a consensus.•••Don't allow anything but directory-signature tokens in a consensus after the first directory-signature token. Fixes bug in bandwidth-weights branch. Found by "outofwords." Nick Mathewson2010-02-26
* | Fix 64-bit printf issues in consensus-bw-weights5-merge.•••For my 64-bit Linux system running with GCC 4.4.3-fc12-whatever, you can't do 'printf("%lld", (int64_t)x);' Instead you need to tell the compiler 'printf("%lld", (long long int)x);' or else it doesn't believe the types match. This is why we added U64_PRINTF_ARG; it looks like we needed an I64_PRINTF_ARG too. Nick Mathewson2010-02-25
* | Clearly mark directory footer so we parse the new weight line.Mike Perry2010-02-22
* | Add parsing+verification for bw weight values.Mike Perry2010-02-22
* | network-status-version must come first in a vote/consensus•••Spec conformance issue: The code didn't force the network-status-version token to be the first token in a v3 vote or consensus. Problem discovered by Parakeep. Sebastian Hahn2010-02-22
* | Remove duplicate words and a duplicate newline.Karsten Loesing2009-12-18
* | Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson2009-12-12
* | *_free functions now accept NULL•••Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary. Sebastian Hahn2009-12-12
* | Document the microdescriptor code better.Nick Mathewson2009-10-18
* | Parse detached signatures and microdesc networkstatuses correctly.Nick Mathewson2009-10-15
* | Parse detached signature documents with multiple flavors and algorithms.Nick Mathewson2009-10-15
* | Refactor consensus signature storage for multiple digests and flavors.•••This patch introduces a new type called document_signature_t to represent the signature of a consensus document. Now, each consensus document can have up to one document signature per voter per digest algorithm. Also, each detached-signatures document can have up to one signature per <voter, algorithm, flavor>. Nick Mathewson2009-10-15
* | Code to generate, store, and parse microdescriptors and consensuses.•••The consensus documents are not signed properly, not served, and not exchanged yet. Nick Mathewson2009-10-15
* | Add ability to parse one or more m line from a vote.Nick Mathewson2009-10-15
* | Allow signed data to include other hashes later.•••Previously, we insisted that a valid signature must be a signature of the expected digest. Now we accept anything that starts with the expected digest. This lets us include another digest later. Nick Mathewson2009-10-15
* | Signature-checking code can handle longer digests.Nick Mathewson2009-10-15
* | Make signature-generation code handle different key and digest lengths.Nick Mathewson2009-10-15
* | Merge commit 'sebastian/specconformance'Roger Dingledine2009-09-16
|\ \
| * | Fix a spec conformance issue when parsing a ns vote•••A vote may only contain exactly one signature. Make sure we reject votes that violate this. Problem found by Rotor, who also helped writing the patch. Thanks! Sebastian Hahn2009-09-14
* | | Merge commit 'origin/maint-0.2.1'•••Resolved conflicts in: src/or/circuitbuild.c Nick Mathewson2009-09-15
|\ \ \ | | |/ | |/|
| * | Fix a memory leak when parsing a ns•••Adding the same vote to a networkstatus consensus leads to a memory leak on the client side. Fix that by only using the first vote from any given voter, and ignoring the others. Problem found by Rotor, who also helped writing the patch. Thanks! Sebastian Hahn2009-09-14
* | | Implement proposal 167: Authorities vote on network parameters.•••This code adds a new field to vote on: "params". It consists of a list of sorted key=int pairs. The output is computed as the median of all the integers for any key on which anybody voted. Improved with input from Roger. Nick Mathewson2009-09-14
| |/ |/|
* | Fix compile warnings on Snow Leopard•••Big thanks to nickm and arma for helping me with this! Sebastian Hahn2009-09-01
* | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-09-01
|\|
| * Fix compile warnings on Snow Leopard•••Big thanks to nickm and arma for helping me with this! Sebastian Hahn2009-09-01