aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
AgeCommit message (Collapse)Author
2015-09-16fixup Clarify ambiguous log message in router_add_exit_policyteor (Tim Wilson-Brown)
2015-09-16fixup Only set TAPMP_STAR_IPV6_ONLY if TAPMP_EXTENDED_STAR is setteor (Tim Wilson-Brown)
Also fix a comment.
2015-09-16ExitPolicy accept6/reject6 produces IPv6 wildcard addresses onlyteor (Tim Wilson-Brown)
In previous versions of Tor, ExitPolicy accept6/reject6 * produced policy entries for IPv4 and IPv6 wildcard addresses. To reduce operator confusion, change accept6/reject6 * to only produce an IPv6 wildcard address. Resolves bug #16069. Patch on 2eb7eafc9d78 and a96c0affcb4c (25 Oct 2012), released in 0.2.4.7-alpha.
2015-09-16Ignore accept6/reject6 IPv4, warn about unexpected rule outcomesteor (Tim Wilson-Brown)
When parsing torrc ExitPolicies, we now warn if: * an IPv4 address is used on an accept6 or reject6 line. The line is ignored, but the rest of the policy items in the list are used. (accept/reject continue to allow both IPv4 and IPv6 addresses in torrcs.) * a "private" address alias is used on an accept6 or reject6 line. The line filters both IPv4 and IPv6 private addresses, disregarding the 6 in accept6/reject6. When parsing torrc ExitPolicies, we now issue an info-level message: * when expanding an accept/reject * line to include both IPv4 and IPv6 wildcard addresses. In each instance, usage advice is provided to avoid the message. Partial fix for ticket 16069. Patch by "teor". Patch on 2eb7eafc9d78 and a96c0affcb4c (25 Oct 2012), released in 0.2.4.7-alpha.
2015-09-14Update comments about ExitPolicy parsingteor (Tim Wilson-Brown)
Fix incomplete and incorrect comments. Comment changes only.
2015-07-16Fix most check-spaces issuesNick Mathewson
2015-06-25Merge remote-tracking branch 'origin/maint-0.2.6'Nick Mathewson
2015-06-22Repair breakage in early-error case of microdesc parsingNick Mathewson
When I fixed #11243, I made it so we would take the digest of a descriptor before tokenizing it, so we could desist from download attempts if parsing failed. But when I did that, I didn't remove an assertion that the descriptor began with "onion-key". Usually, this was enforced by "find_start_of_next_microdescriptor", but when find_start_of_next_microdescriptor returned NULL, the assertion was triggered. Fixes bug 16400. Thanks to torkeln for reporting and cypherpunks_backup for diagnosing and writing the first fix here.
2015-06-01Add a master-key-ed25519 line for convenienceNick Mathewson
2015-06-01Appease make check-spacesAndrea Shepard
2015-05-28fix memory leak on bad ns convote. CID 1301371.Nick Mathewson
2015-05-28Merge branch '12498_ed25519_keys_v6'Nick Mathewson
Fixed numerous conflicts, and ported code to use new base64 api.
2015-05-28Checkpoint some work on voting on ed25519 identitiesNick Mathewson
* Include ed25519 identities in votes * Include "no ed25519 identity" in votes * Include some commented-out code about identity voting. (This will disappear.) * Include some functions for identity voting (These will disappear.) * Enforce uniqueness in ed25519 keys within a vote
2015-05-28Sign extrainfo documents with ed25519Nick Mathewson
Extrainfo documents are now ed-signed just as are router descriptors, according to proposal 220. This patch also includes some more tests for successful/failing parsing, and fixes a crash bug in ed25519 descriptor parsing.
2015-05-28Include ed25519 keys in microdescriptors.Nick Mathewson
2015-05-28Fix the position-check for ed25519 certs to work with annotationsNick Mathewson
When there are annotations on a router descriptor, the ed25519-identity element won't be at position 0 or 1; it will be at router+1 or router-1. This patch also adds a missing smartlist function to search a list for an item with a particular pointer.
2015-05-28Implement proposal 228: cross-certification with onion keysNick Mathewson
Routers now use TAP and ntor onion keys to sign their identity keys, and put these signatures in their descriptors. That allows other parties to be confident that the onion keys are indeed controlled by the router that generated the descriptor.
2015-05-28Implement ed25519-signed descriptorsNick Mathewson
Now that we have ed25519 keys, we can sign descriptors with them and check those signatures as documented in proposal 220.
2015-04-23Merge remote-tracking branch 'dgoulet/bug14847_027_06'Nick Mathewson
2015-04-23Correct "longest possible policy" comment in router policyteor
The "longest possible policy" comment in router_parse_addr_policy_item_from_string() used an example policy that was actually shorter than the maximum length. This comment was amended, and expanded to count the maximum number of characters. Comment change only.
2015-04-23Use a custom Base64 encoder with more control over the output format.Yawning Angel
2015-04-22Add function to validate HS descriptor IDDavid Goulet
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-04-06Merge remote-tracking branch 'origin/maint-0.2.6'Nick Mathewson
2015-04-06Merge remote-tracking branch 'origin/maint-0.2.5' into maint-0.2.6Nick Mathewson
2015-04-06Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5Nick Mathewson
2015-04-06Handle empty/zero length encoded intro points more gracefully.Yawning Angel
In theory these should never the triggered as the only caller now validates the parameters before this routine gets called.
2015-03-24Remove version checks for microdescriptor supportNick Mathewson
At this point, relays without microdescriptor support are no longer allowed on the Tor network.
2015-02-18clean up comments and whitespace a bitRoger Dingledine
2015-02-18Merge branch 'bug9321_rerebase'Nick Mathewson
Conflicts: src/or/dirvote.h src/test/include.am src/test/test_entrynodes.c
2015-02-18Final guardfraction preparations for upstream merge.George Kadianakis
- Write a changes file. - Change some logs to lesser severities.
2015-02-18Parse GuardFraction info from consensuses and votes.George Kadianakis
Also introduce the UseGuardFraction torrc option which decides whether clients should use guardfraction information found in the consensus.
2015-01-29When there are no package lines, make consensus/packages say "".Nick Mathewson
Also, give a better error message when there is no consensus.
2015-01-10Implement proposal 227-vote-on-package-fingerprints.txtNick Mathewson
This implementation includes tests and a little documentation.
2015-01-07Merge branch 'bug9286_v3_squashed'Nick Mathewson
2015-01-07Stop accepting milliseconds in various directory contextsNick Mathewson
Have clients and authorities both have new behavior, since the fix for bug 11243 has gone in. But make clients still accept accept old bogus HSDir descriptors, to avoid fingerprinting trickery. Fixes bug 9286.
2015-01-06Merge remote-tracking branch 'public/bug13661_025'Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-24Allow consensus interval of 10 seconds when testingteor
Decrease minimum consensus interval to 10 seconds when TestingTorNetwork is set. (Or 5 seconds for the first consensus.) Fix code that assumes larger interval values. This assists in quickly bootstrapping a testing Tor network. Fixes bugs 13718 & 13823.
2014-11-05Fix version number parsing to allow 2- and 3-part versions.Nick Mathewson
Fixes bug 13661; bugfix on 0.0.8pre1.
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?
2014-10-13Add comments to can_dl_again usageNick Mathewson
2014-10-13Note that parse-list functions may add duplicate 'invalid' entries.Nick Mathewson
2014-10-13Treat unparseable (micro)descriptors and extrainfos as undownloadableNick Mathewson
One pain point in evolving the Tor design and implementing has been adding code that makes clients reject directory documents that they previously would have accepted, if those descriptors actually exist. When this happened, the clients would get the document, reject it, and then decide to try downloading it again, ad infinitum. This problem becomes particularly obnoxious with authorities, since if some authorities accept a descriptor that others don't, the ones that don't accept it would go crazy trying to re-fetch it over and over. (See for example ticket #9286.) This patch tries to solve this problem by tracking, if a descriptor isn't parseable, what its digest was, and whether it is invalid because of some flaw that applies to the portion containing the digest. (This excludes RSA signature problems: RSA signatures aren't included in the digest. This means that a directory authority can still put another directory authority into a loop by mentioning a descriptor, and then serving that descriptor with an invalid RSA signatures. But that would also make the misbehaving directory authority get DoSed by the server it's attacking, so it's not much of an issue.) We already have a mechanism to mark something undownloadable with downloadstatus_mark_impossible(); we use that here for microdescriptors, extrainfos, and router descriptors. Unit tests to follow in another patch. Closes ticket #11243.
2014-09-21get rid of routerstatus->version_supports_optimistic_dataRoger Dingledine
Clients are now willing to send optimistic circuit data (before they receive a 'connected' cell) to relays of any version. We used to only do it for relays running 0.2.3.1-alpha or later, but now all relays are new enough. Resolves ticket 13153.
2014-09-09Remove client-side bad directory logicSebastian Hahn
Implements the second half of #13060.
2014-09-02Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-09-02Fix a number of clang analyzer false-positivesNick Mathewson
Most of these are in somewhat non-obvious code where it is probably a good idea to initialize variables and add extra assertions anyway. Closes 13036. Patches from "teor".
2014-08-29Introduce full coverage tests for module routerset.c.dana koch
This is using the paradigm introduced for test_status.c.
2014-08-15Remove implementation code for all pre-13 consensus methods.Nick Mathewson
Also remove a test for the way that we generated parameter votes before consensus method 12.
2014-04-29Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson