aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
AgeCommit message (Collapse)Author
2016-05-17whitespace fixesNick Mathewson
2016-05-17Remove duplicate siging_key_cert fields.Nick Mathewson
With the fix for #17150, I added a duplicate certificate here. Here I remove the original location in 0.2.8. (I wouldn't want to do that in 027, due to the amount of authority-voting-related code drift.) Closes 19073.
2016-05-17Merge branch 'bug17150_027_extra' into maint-0.2.8Nick Mathewson
2016-05-17Improve API of routerinfo_incompatible_with_extrainfo()Nick Mathewson
This API change makes it so that routerinfo_incompatible...() no longer takes a routerinfo_t, so that it's obvious that it should only look at fields from the signed_descriptor_t. This change should prevent a recurrence of #17150.
2016-05-17Merge remote-tracking branch 'arma/bug18616-v4' into maint-0.2.8Nick Mathewson
2016-05-16touchups and refactorings on bug 18616 branchRoger Dingledine
no behavior changes
2016-05-11Merge branch 'maint-0.2.7' into maint-0.2.8Roger Dingledine
2016-05-11unbreak the build (when warnings are enabled)Roger Dingledine
2016-05-11Merge branch 'maint-0.2.7' into maint-0.2.8Nick Mathewson
2016-05-11Fix out-of-bounds write during voting with duplicate ed25519 keysJohn Brooks
In dirserv_compute_performance_thresholds, we allocate arrays based on the length of 'routers', a list of routerinfo_t, but loop over the nodelist. The 'routers' list may be shorter when relays were filtered by routers_make_ed_keys_unique, leading to an out-of-bounds write on directory authorities. This bug was originally introduced in 26e89742, but it doesn't look possible to trigger until routers_make_ed_keys_unique was introduced in 13a31e72. Fixes bug 19032; bugfix on tor 0.2.8.2-alpha.
2016-04-28Decide to advertise begindir support like we decide to advertise DirPortteor (Tim Wilson-Brown)
Decide to advertise begindir support in a similar way to how we decide to advertise DirPort. Fix up the associated descriptor-building unit tests. Resolves #18616, bugfix on 0c8e042c30946faa in #12538 in 0.2.8.1-alpha.
2016-03-21Merge branch 'maint-0.2.7'Nick Mathewson
2016-03-21In routers_make_ed_keys_unique, break ties for published_onNick Mathewson
This ensures that if we can't use published_on to decide an ed,rsa mapping, we at least decide deterministically. Resolves 17668.T3
2016-03-21After we strip out duplicate entries from 'routers', don't use 'rl'.Nick Mathewson
We've got to make sure that every single subsequent calculation in dirserv_generate_networkstatus_vote_obj() are based on the list of routerinfo_t *after* we've removed possible duplicates, not before. Fortunately, none of the functions that were taking a routerlist_t as an argument were actually using any fields other than this list of routers. Resolves issue 18318.DG3.
2016-03-21Never vote for an ed key twice.Nick Mathewson
When generating a vote, and we have two routerinfos with the same ed key, omit the one published earlier. This was supposed to have been solved by key pinning, but when I made key pinning optional, I didn't realize that this would jump up and bite us. It is part of bug 18318, and the root cause of 17668.
2016-02-27Update the copyright year.Nick Mathewson
2016-02-23Merge branch 'bug17795'Nick Mathewson
2016-02-10Rename crypto_digest_all, and digests_t.Nick Mathewson
They are no longer "all" digests, but only the "common" digests. Part of 17795. This is an automated patch I made with a couple of perl one-liners: perl -i -pe 's/crypto_digest_all/crypto_common_digests/g;' src/*/*.[ch] perl -i -pe 's/\bdigests_t\b/common_digests_t/g;' src/*/*.[ch]
2016-02-08fix wide lines, use more locals.Nick Mathewson
2016-02-07Using router_get_my_routerinfo()Harini Kannan
2016-01-27Correct further grammatical errors in tor commentsNick Mathewson
Avoid using a pronoun where it makes comments unclear. Avoid using gender for things that don't have it. Avoid assigning gender to people unnecessarily.
2015-12-18A router must be a dir cache before it may be HSDirMatthew Finkel
Fixes #15801
2015-12-16A relay now advertises "tunnelled-dir-server" in its descriptorMatthew Finkel
When a relay does not have an open directory port but it has an orport configured and is accepting client connections then it can now service tunnelled directory requests, too. This was already true of relays with an dirport configured. We also conditionally stop advertising this functionality if the relay is nearing its bandwidth usage limit - same as how dirport advertisement is determined. Partial implementation of prop 237, ticket 12538
2015-12-16Authorities must set a router's V2Dir flag if it supports tunnelled reqsMatthew Finkel
Partial implementation of prop 237, ticket 12538
2015-12-15Replace usage of INLINE with inlinecypherpunks
This patch was generated using; sed -i -e "s/\bINLINE\b/inline/" src/*/*.[ch] src/*/*/*.[ch]
2015-09-23New AuthDirPinKeys option to enable/disable keypinning enforcementNick Mathewson
Implements ticket #17135. We're going to need this one to avoid chaos as everybody figures out how ed25519 keys work.
2015-09-02Merge remote-tracking branch 'dgoulet/bug15963_026_01'Nick Mathewson
2015-09-02Don't vote HSDir if we aren't voting FastDavid Goulet
Fixes #15963 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-09-01missing semicolonNick Mathewson
2015-09-01Fix an always-false check with an assertionNick Mathewson
In validate_recommended_package_line, at this point in the function, n_entries is always >= 1. Coverity doesn't like us checking it for 0. CID 1268063.
2015-08-18Refactor TestingDirAuthVote* into dirserv_set_routerstatus_testingteor
Make it easier to unit test TestingDirAuthVote{Exit,Guard,HSDir} by refactoring the code which sets flags based on them into a new function dirserv_set_routerstatus_testing.
2015-08-18New TestingDirAuthVote{Exit,Guard,HSDir}IsStrict flagsteor
"option to prevent guard,exit,hsdir flag assignment" "A node will never receive the corresponding flag unless that node is specified in the TestingDirAuthVote{Exit,Guard,HSDir} list, regardless of its uptime, bandwidth, exit policy, or DirPort". Patch modified by "teor": VoteOnHidServDirectoriesV2 is now obsolete, so TestingDirAuthVoteHSDir always votes on HSDirs. Closes ticket 14882. Patch by "robgjansen". Commit message and changes file by "teor" with quotes from "robgjansen".
2015-08-17Fix an assertion failure introduced in 20254907d7Nick Mathewson
Fixes bug 16829; bug not in any released Tor.
2015-08-11Make HSDir depend on Running/Valid again.Nick Mathewson
When we removed Running/Valid checks from Fast and Stable in 8712, I removed them from HSDir too, which apparently wasn't a good idea. Reverts part of a65e835800b1af2c2a4c215b. Fixes bug 16524. Bugfix on 0.2.7.2-alpha.
2015-07-31Improve log messages for problems about ed25519 keypinningNick Mathewson
Fixes 16286; bugfix on 0.2.7.2-alpha.
2015-07-16Merge remote-tracking branch 'public/ticket16543'Nick Mathewson
2015-07-14Add changes file for 8712; apply it to HSDir flag as well.Nick Mathewson
2015-07-14Vote for relays to be fast and stable even when they aren't currently active.Peter Retzlaff
2015-07-10Remove the HidServDirV2 and VoteOnHidServDirectoriesV2 optionsNick Mathewson
(Mark them as obsolete) Closes 16543.
2015-06-08Merge remote-tracking branch 'origin/maint-0.2.6'Nick Mathewson
2015-06-08HSDir flag now requires the Stable flagDavid Goulet
Fixes #8243
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-28Tie key-pinning logic into directory authority operationNick Mathewson
With this patch: * Authorities load the key-pinning log at startup. * Authorities open a key-pinning log for writing at startup. * Authorities reject any router with an ed25519 key where they have previously seen that ed25519 key with a different RSA key, or vice versa. * Authorities warn about, but *do not* reject, RSA-only descriptors when the RSA key has previously gone along with an Ed25519 key. (We should make this a 'reject' too, but we can't do that until we're sure there's no legit reason to downgrade to 0.2.5.)
2015-04-28Revert "Remove obsolete workaround in dirserv_thinks_router_is_hs_dir()"David Goulet
Fixes #15850, part of #15801. Change file is added by this commit. The original comment in the reverted commit is removed because right now we *need* a DirPort until #15849 is implemented so no doubt nor confusion there anymore. This reverts commit 80bed1ac96a3035f8c55ddced5528f0d7d16d386. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-02-19Try to fix authdir_newdesc eventsNick Mathewson
We were sending values that were truncated by the length of the annotations.
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-18Write guardfraction information to votes.George Kadianakis
If a dirauth has guardfraction information about a guard, write it down when serializing the routerstatus.
2015-02-18Parse Guardfraction file and apply results to routerstatuses.George Kadianakis
Parse the file just before voting and apply its information to the provided vote_routerstatus_t. This follows the same logic as when dirauths parse bwauth files.