aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
AgeCommit message (Collapse)Author
2014-03-23Be more lenient in our fix for bug 11149Roger Dingledine
There are still quite a few 0.2.3.2x relays running for x<5, and while I agree they should upgrade, I don't think cutting them out of the network is a net win on either side.
2014-03-23Merge remote-tracking branch 'karsten/task-11070'Nick Mathewson
2014-03-18Take out remaining V1 directory code.Karsten Loesing
2014-03-06Stop accepting 0.2.2 relay uploads for the consensus.Nick Mathewson
Resolves ticket 11149.
2014-03-05Merge remote-tracking branch 'arma/ticket5528'Nick Mathewson
Conflicts: src/or/router.c src/test/test_dir.c
2014-02-15Remove a bunch of functions that were never called.Nick Mathewson
2014-02-03More fixes to rip out all of the v2 directory code.Karsten Loesing
(This was a squash commit, but I forgot to squash it. Sorry! --Nick)
2014-01-29Rip out all of the v2 directory code.Nick Mathewson
The remaining vestige is that we continue to publish the V2dir flag, and that, for the controller, we continue to emit v2 directory formats when requested.
2013-10-21A Bridge Authority should compute flag thresholdsMatthew Finkel
As a bridge authority, before we create our networkstatus document, we should compute the thresholds needed for the various status flags assigned to each bridge based on the status of all other bridges. We then add these thresholds to the networkstatus document for easy access. Fixes for #1117 and #9859.
2013-10-07Add TestingDirAuthVoteGuard option for specifying relays to vote Guard on.Linus Nordberg
Addresses ticket 9206.
2013-07-10Completely refactor how FILENAME_PRIVATE worksNick Mathewson
We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
2013-06-13Merge remote-tracking branch 'linus/bug8532'Nick Mathewson
2013-06-13Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-06-12Make all consumers of microdesc_t.body tolerate NULLNick Mathewson
This is another fix to try to mitigate recurrences of 8031/8822.
2013-06-08Add support for offsetting the voting interval in order to bootstrap faster.Linus Nordberg
A new option TestingV3AuthVotingStartOffset is added which offsets the starting time of the voting interval. This is possible only when TestingTorNetwork is set. This patch makes run_scheduled_events() check for new consensus downloads every second when TestingTorNetwork, instead of every minute. This should be fine, see #8532 for reasoning. This patch also brings MIN_VOTE_SECONDS and MIN_DIST_SECONDS down from 20 to 2 seconds, unconditionally. This makes sanity checking of misconfiguration slightly less sane. Addresses #8532.
2013-05-07Merge branch 'maint-0.2.4' into masterAndrea Shepard
2013-05-05Use a clearer idiom for node identity in router_counts_toward_thresholdsNick Mathewson
2013-05-05Fix 8833: crash bug from using NULL node->ri in dirserv.cNick Mathewson
It appears that moria1 crashed because of one instance of this (the one in router_counts_toward_thresholds). The other instance I fixed won't actually have broken anything, but I think it's more clear this way. Fixes bug 8833; bugfix on 0.2.4.12-alpha.
2013-04-18Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2013-04-18Add a boolean to flag-thresholds for "we have enough measured bandwidth"Nick Mathewson
Implements #8711.
2013-04-18Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
Conflicts: src/common/crypto.c
2013-04-18Merge branch 'less_charbuf_rebased' into maint-0.2.4Nick Mathewson
Conflicts: src/or/dirserv.c src/or/dirserv.h src/test/test_dir.c
2013-04-18Add a quick-and-dirty-test for generate_v2_networkstatus.Nick Mathewson
It sure is a good thing we can run each test in its own process, or else the amount of setup I needed to do to make this thing work would have broken all the other tests. Test mocking would have made this easier to write too.
2013-04-18Refactor dirobj signature generationNick Mathewson
Now we can compute the hash and signature of a dirobj before concatenating the smartlist, and we don't need to play silly games with sigbuf and realloc any more.
2013-04-18Refactor v2 networkstatus generation to avoid buffer-styleNick Mathewson
2013-04-18Refactor routerstatus_format_entry to avoid character-buffersNick Mathewson
2013-04-14Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
Conflicts: src/or/dirserv.c
2013-04-14Remove a now-empty if body; invert the sense of its conditionNick Mathewson
2013-04-14Remvoe total_bandwidth and total_exit_bandwidth as unused.Nick Mathewson
2013-04-14Rename all fields which measure bw in kb to end with _kbNick Mathewson
2013-04-14Fix some KB/B confusion in flag threshold minima.Nick Mathewson
2013-04-12fix trivial typoRoger Dingledine
2013-04-11Use credible_bandwidth uniformly in setting/using fast_bandwidthNick Mathewson
We were using credible_bandwidth to build the fast_bandwidth threshold, but comparing it to bandwidth_for_router.
2013-04-11Use correct units for dirserv_get_{credible_bandwidth,bandwidth_for_router}Nick Mathewson
We were mixing bandwidth file entries (which are in kilobytes) with router_get_advertised_bw() entries, which were in bytes. Also, use router_get_advertised_bandwidth_capped() for credible_bandwidth.
2013-03-20Set default minimum bandwidth for exit flag to zero for TestingTorNetworkAndrea Shepard
2013-03-20Let testing networks override ABSOLUTE_MIN_VALUE_FOR_FAST_FLAGNick Mathewson
This adds a new option to fix bug 8508 which broke chutney networks. The bug was introduced by 317d16de.
2013-03-18Merge remote-tracking branch 'public/bug6164' into maint-0.2.4Nick Mathewson
2013-03-18Improve comment for routers_with_measured_bw static var in dirserv.cAndrea Shepard
2013-03-18Improve comment on router_counts_toward_thresholds()Andrea Shepard
2013-03-18Add dirserv_has_measured_bw() predicate wrapper for ↵Andrea Shepard
dirserv_query_measured_bw_cache()
2013-03-18Ignore advertised bandwidths if we have enough measured bandwidths availableAndrea Shepard
2013-03-07Better comment for dirserv_query_measured_bw_cache()Andrea Shepard
2013-03-07Use DIGESTMAP_FOREACH_MODIFY in dirserv_expire_measured_bw_cache() for concisionAndrea Shepard
2013-03-07Add unit test for dirserv measured bandwidth cacheAndrea Shepard
2013-03-07Make sure expiry check in dirserv_expire_measured_bw_cache() works if time_t ↵Andrea Shepard
is unsigned
2013-03-07More constness in dirserv.cAndrea Shepard
2013-03-07Make dirserv_cache_measured_bw() use a const measured_bw_line_t *Andrea Shepard
2013-03-05Call dirserv_clear_measured_bw_cache() from dirserv_free_all()Andrea Shepard
2013-02-27Prefer measured bandwidths over advertised when computing things for votes ↵Andrea Shepard
on a dirauth
2013-02-19Clear up a comment about when an assertion could fireNick Mathewson
Resolves ticket 6164