| Commit message (Expand) | Author | Age |
* | Completely refactor how FILENAME_PRIVATE works•••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.
| Nick Mathewson | 2013-07-10 |
* | Merge remote-tracking branch 'linus/bug8532' | Nick Mathewson | 2013-06-13 |
|\ |
|
| * | Add support for offsetting the voting interval in order to bootstrap faster.•••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.
| Linus Nordberg | 2013-06-08 |
* | | Merge remote-tracking branch 'origin/maint-0.2.4' | Nick Mathewson | 2013-06-13 |
|\ \
| |/
|/| |
|
| * | Make all consumers of microdesc_t.body tolerate NULL•••This is another fix to try to mitigate recurrences of 8031/8822.
| Nick Mathewson | 2013-06-12 |
* | | Merge branch 'maint-0.2.4' into master | Andrea Shepard | 2013-05-07 |
|\| |
|
| * | Use a clearer idiom for node identity in router_counts_toward_thresholds | Nick Mathewson | 2013-05-05 |
| * | Fix 8833: crash bug from using NULL node->ri in dirserv.c•••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.
| Nick Mathewson | 2013-05-05 |
* | | Merge remote-tracking branch 'origin/maint-0.2.4' | Nick Mathewson | 2013-04-18 |
|\| |
|
| * | Add a boolean to flag-thresholds for "we have enough measured bandwidth"•••Implements #8711.
| Nick Mathewson | 2013-04-18 |
* | | Merge remote-tracking branch 'origin/maint-0.2.4'•••Conflicts:
src/common/crypto.c
| Nick Mathewson | 2013-04-18 |
|\| |
|
| * | Merge branch 'less_charbuf_rebased' into maint-0.2.4•••Conflicts:
src/or/dirserv.c
src/or/dirserv.h
src/test/test_dir.c
| Nick Mathewson | 2013-04-18 |
| |\ |
|
| | * | Add a quick-and-dirty-test for generate_v2_networkstatus.•••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.
| Nick Mathewson | 2013-04-18 |
| | * | Refactor dirobj signature generation•••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.
| Nick Mathewson | 2013-04-18 |
| | * | Refactor v2 networkstatus generation to avoid buffer-style | Nick Mathewson | 2013-04-18 |
| | * | Refactor routerstatus_format_entry to avoid character-buffers | Nick Mathewson | 2013-04-18 |
* | | | Merge remote-tracking branch 'origin/maint-0.2.4'•••Conflicts:
src/or/dirserv.c
| Nick Mathewson | 2013-04-14 |
|\| | |
|
| * | | Remove a now-empty if body; invert the sense of its condition | Nick Mathewson | 2013-04-14 |
| * | | Remvoe total_bandwidth and total_exit_bandwidth as unused. | Nick Mathewson | 2013-04-14 |
| * | | Rename all fields which measure bw in kb to end with _kb | Nick Mathewson | 2013-04-14 |
| * | | Fix some KB/B confusion in flag threshold minima. | Nick Mathewson | 2013-04-14 |
| * | | Use credible_bandwidth uniformly in setting/using fast_bandwidth•••We were using credible_bandwidth to build the fast_bandwidth
threshold, but comparing it to bandwidth_for_router.
| Nick Mathewson | 2013-04-11 |
| * | | Use correct units for dirserv_get_{credible_bandwidth,bandwidth_for_router}•••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.
| Nick Mathewson | 2013-04-11 |
* | | | fix trivial typo | Roger Dingledine | 2013-04-12 |
|/ / |
|
* | | Set default minimum bandwidth for exit flag to zero for TestingTorNetwork | Andrea Shepard | 2013-03-20 |
* | | Let testing networks override ABSOLUTE_MIN_VALUE_FOR_FAST_FLAG•••This adds a new option to fix bug 8508 which broke chutney
networks. The bug was introduced by 317d16de.
| Nick Mathewson | 2013-03-20 |
* | | Merge remote-tracking branch 'public/bug6164' into maint-0.2.4 | Nick Mathewson | 2013-03-18 |
|\ \ |
|
| * | | Clear up a comment about when an assertion could fire•••Resolves ticket 6164
| Nick Mathewson | 2013-02-19 |
| |/ |
|
* | | Improve comment for routers_with_measured_bw static var in dirserv.c | Andrea Shepard | 2013-03-18 |
* | | Improve comment on router_counts_toward_thresholds() | Andrea Shepard | 2013-03-18 |
* | | Add dirserv_has_measured_bw() predicate wrapper for dirserv_query_measured_bw... | Andrea Shepard | 2013-03-18 |
* | | Ignore advertised bandwidths if we have enough measured bandwidths available | Andrea Shepard | 2013-03-18 |
* | | Better comment for dirserv_query_measured_bw_cache() | Andrea Shepard | 2013-03-07 |
* | | Use DIGESTMAP_FOREACH_MODIFY in dirserv_expire_measured_bw_cache() for concision | Andrea Shepard | 2013-03-07 |
* | | Add unit test for dirserv measured bandwidth cache | Andrea Shepard | 2013-03-07 |
* | | Make sure expiry check in dirserv_expire_measured_bw_cache() works if time_t ... | Andrea Shepard | 2013-03-07 |
* | | More constness in dirserv.c | Andrea Shepard | 2013-03-07 |
* | | Make dirserv_cache_measured_bw() use a const measured_bw_line_t * | Andrea Shepard | 2013-03-07 |
* | | Call dirserv_clear_measured_bw_cache() from dirserv_free_all() | Andrea Shepard | 2013-03-05 |
* | | Prefer measured bandwidths over advertised when computing things for votes on... | Andrea Shepard | 2013-02-27 |
|/ |
|
* | Merge branch 'bug2286_unit_test_squashed' | Nick Mathewson | 2013-02-19 |
|\ |
|
| * | Refactor storing of measured_bw versus Unmeasured=1.•••This patch moves the measured_bw field and the has_measured_bw field
into vote_routerstatus_t, since only votes have 'Measured=XX' set on
their weight line.
I also added a new bw_is_unmeasured flag to routerstatus_t to
represent the Unmeasured=1 flag on a w line. Previously, I was using
has_measured_bw for this, which was quite incorrect: has_measured_bw
means that the measured_bw field is set, and it's probably a mistake
to have it serve double duty as meaning that 'baandwidth' represents a
measured value.
While making this change,I also found a harmless but stupid bug in
dirserv_read_measured_bandwidths: It assumes that it's getting a
smartlist of routerstatus_t, when really it's getting a smartlist of
vote_routerstatus_t. C's struct layout rules mean that we could never
actually get an error because of that, but it's still quite incorrect.
I fixed that, and in the process needed to add two more sorting and
searching helpers.
Finally, I made the Unmeasured=1 flag get parsed. We don't use it for
anything yet, but someday we might.
This isn't complete yet -- the new 2286 unit test doesn't build.
| Nick Mathewson | 2013-02-19 |
* | | Merge remote-tracking branch 'public/bug8158' | Nick Mathewson | 2013-02-11 |
|\ \ |
|
| * | | Refactor generating the m lines in a vote into its own function | Nick Mathewson | 2013-02-08 |
| |/ |
|
* / | Refactor resolve_my_address() so logs are more accurate / helpful•••It returns the method by which we decided our public IP address
(explicitly configured, resolved from explicit hostname, guessed from
interfaces, learned by gethostname).
Now we can provide more helpful log messages when a relay guesses its IP
address incorrectly (e.g. due to unexpected lines in /etc/hosts). Resolves
ticket 2267.
While we're at it, stop sending a stray "(null)" in some cases for the
server status "EXTERNAL_ADDRESS" controller event. Resolves bug 8200.
| Roger Dingledine | 2013-02-11 |
|/ |
|
* | Include a flag-thresholds line in each vote to describe flag cutoffs•••Implements ticket 8151.
| Nick Mathewson | 2013-02-04 |
* | When we mark a node as a sybil, mark it down and reset its uptime to 0•••This prevents bug 8147, where such nodes would accrue points towards
Guard, Fast, HSDir, and so on.
Fixes bug 8147.
| Nick Mathewson | 2013-02-04 |
* | Ignore tiny bandwidths entirely when computing thresholds•••Another bug 8145 fix.
| Nick Mathewson | 2013-02-04 |
* | Increase the minimum value for the Fast flag to 4096.•••Fix for 8145.
| Nick Mathewson | 2013-02-04 |
* | Refactor should-count-towards-thresholds test into new function | Nick Mathewson | 2013-02-04 |