summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
AgeCommit message (Collapse)Author
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.
2015-02-17Merge remote-tracking branch 'public/feature_13822'Nick Mathewson
2015-02-16Maybe this will make coverity not care that this check is dead. CID 1268063Nick Mathewson
2015-02-07Split ROUTER_REQUIRED_MIN_BANDWIDTH into RELAY_ and BRIDGE_ variantsNick Mathewson
Also raise those minima from 20 to 75 and 50 respectively. Closes ticket 13822.
2015-02-04Bump the minimum relay version to 0.2.4.18-rcNick Mathewson
Closes #13555
2015-02-02Merge remote-tracking branch 'dgoulet/bug14202_026_v1'Nick Mathewson
2015-01-30Merge remote-tracking branch 'public/prop227_v2'Nick Mathewson
Conflicts: src/test/test_dir.c
2015-01-29Correctly reject packages lines with empty entriesNick Mathewson
2015-01-29Define 'digesttype' correctlyNick Mathewson
2015-01-29Remove obsolete workaround in dirserv_thinks_router_is_hs_dir()David Goulet
Fixes #14202 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-28more typo fixes from mcs and gkNick Mathewson
2015-01-27Fixes on prop227 comments, based on comments by mcs on #10395Nick Mathewson
2015-01-13whitespace fixNick Mathewson
2015-01-10Implement proposal 227-vote-on-package-fingerprints.txtNick Mathewson
This implementation includes tests and a little documentation.
2015-01-10Create TestingDirAuthVoteHSDir like TestingDirAuthVoteExit/Guardteor
TestingDirAuthVoteHSDir ensures that authorities vote the HSDir flag for the listed relays regardless of uptime or ORPort connectivity. Respects the value of VoteOnHidServDirectoriesV2. Partial fix for bug 14067.
2015-01-07Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2015-01-07Enlarge the buffer for a line in a bw fileSebastian Hahn
2015-01-06Merge remote-tracking branch 'public/feature11791'Nick Mathewson
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-26Fix grammar in comment on running_long_enough_to_decide_unreachableteor
2014-12-24Fix TestingMinExitFlagThreshold 0teor
Stop requiring exits to have non-zero bandwithcapacity in a TestingTorNetwork. Instead, when TestingMinExitFlagThreshold is 0, ignore exit bandwidthcapacity. This assists in bootstrapping a testing Tor network. Fixes bugs 13718 & 13839. Makes bug 13161's TestingDirAuthVoteExit non-essential.
2014-11-17Use smaller zlib objects when under memory pressureNick Mathewson
We add a compression level argument to tor_zlib_new, and use it to determine how much memory to allocate for the zlib object. We use the existing level by default, but shift to smaller levels for small requests when we have been over 3/4 of our memory usage in the past half-hour. Closes ticket 11791.
2014-11-11Renaming ROUTER_WAS_NOT_NEW to ROUTER_IS_ALREADY_KNOWN.rl1987
2014-11-02Apply new calloc coccinelle patchNick Mathewson
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-13Merge remote-tracking branch 'public/bug11243_squashed'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-10-09Remove is_router_version_good_for_possible_guard()Nick Mathewson
The versions which this function would keep from getting the guard flag are already blocked by the minimum version check. Closes 13152.
2014-10-01Add TestingDirAuthVoteExit option (like TestingDirAuthVoteGuard)teor
Add the TestingDirAuthVoteExit option, a list of nodes to vote Exit for, regardless of their uptime, bandwidth, or exit policy. TestingTorNetwork must be set for this option to have any effect. Works around an issue where authorities would take up to 35 minutes to give nodes the Exit flag in a test network, despite short consensus intervals. Partially implements ticket 13161.
2014-09-28Stop spurious clang shallow analysis null pointer errorsteor
Avoid 4 null pointer errors under clang shallow analysis (the default when building under Xcode) by using tor_assert() to prove that the pointers aren't null. Resolves issue 13284 via minor code refactoring.
2014-09-15Clean up a clangalyzer warning in directory_remove_invalidNick Mathewson
"At this point in the code, msg has been set to a string constant. But the tor code checks that msg is not NULL, and the redundant NULL check confuses the analyser[...] To avoid this spurious warning, the patch initialises msg to NULL." Patch from teor. another part of 13157.
2014-09-09Add unittests for finding the third quartile of a set.George Kadianakis
2014-09-09Merge remote-tracking branch 'asn/bug13064'Nick Mathewson
2014-09-09Remove client-side bad directory logicSebastian Hahn
Implements the second half of #13060.
2014-09-09Remove dirauth support for the BadDirectory flagSebastian Hahn
Implements the first half of #13060. The second half will be to remove client support, too.
2014-09-09Remove support for naming directory authoritiesSebastian Hahn
This implements the meat of #12899. This commit should simply remove the parts of Tor dirauths used to check whether a relay was supposed to be named or not, it doesn't yet convert to a new mechanism for reject/invalid/baddir/badexiting relays.
2014-09-06Evaluate TestingDirAuthVoteGuard only after filling all rs elements.George Kadianakis
2014-09-04Fix add_fingerprint_to_dir() doc and signatureSebastian Hahn
This function never returns non-null, but its usage doesn't reflect that. Let's make it explicit. This will be mostly overridden by later commits, so no changes file here.
2014-09-04Remove the AuthDirRejectUnlisted config optionSebastian Hahn
This is in preparation for a big patch series removing the entire Naming system from Tor. In its wake, the approved-routers file is being deprecated, and a replacement option to allow only pre-approved routers is not being implemented.
2014-09-02Don't list relays w/ bw estimate of 0 in the consensusSebastian Hahn
This implements a feature from bug 13000. Instead of starting a bwauth run with this wrong idea about their bw, relays should do the self-test and then get measured.
2014-08-21remove meaningless checks for chunks==NULL in dirserv stuffNick Mathewson
Also, make it clearer that chunks cannot be NULL [CID 1031750, 1031751]
2014-08-13Apply coccinelle script to replace malloc(a*b)->calloc(a,b)Nick Mathewson
2014-07-24Merge branch 'maint-0.2.5'Roger Dingledine
2014-07-24Raise guard threshold to top 25% or 2000 kilounitsRoger Dingledine
Authorities now assign the Guard flag to the fastest 25% of the network (it used to be the fastest 50%). Also raise the consensus weight that guarantees the Guard flag from 250 to 2000. For the current network, this results in about 1100 guards, down from 2500. This step paves the way for moving the number of entry guards down to 1 (proposal 236) while still providing reasonable expected performance for most users. Implements ticket 12690.
2014-07-09Only active relays should be given HSDirMatthew Finkel
We should only assign a relay the HSDir flag if it is currently considered valid. We can accomplish this by only considering active relays, and as a consequence of this we also exclude relays that are currently hibernating. Fixes #12573
2014-05-11Quench clang's complaints with -Wshorten-64-to-32 when time_t is not long.dana koch
On OpenBSD 5.4, time_t is a 32-bit integer. These instances contain implicit treatment of long and time_t as comparable types, so explicitly cast to time_t.