- Oct 13, 2014
-
-
Nick Mathewson authored
Right now this is only needed for test_util_format_time_interval, so define it as a static function. We can move it into compat later if we need to.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
1. The test that adds things to the cache needs to set the clock back so that the descriptors it adds are valid. 2. We split ROUTER_NOT_NEW into ROUTER_TOO_OLD, so that we can distinguish "already had it" from "rejected because of old published date". 3. We make extrainfo_insert() return a was_router_added_t, and we make its caller use it correctly. This is probably redundant with the extrainfo_is_bogus flag.
-
Nick Mathewson authored
Suggested by Andrea in her review of 11243.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
These tests make sure that entries are actually marked undownloadable as appropriate.
-
Nick Mathewson authored
We didn't really have test coverage for these parsing functions, so I went and made some. These tests also verify that the parsing functions set the list of invalid digests correctly.
-
Nick Mathewson authored
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.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
- Oct 12, 2014
-
-
teor authored
Fix an instance of integer overflow in format_time_interval() when taking the absolute value of the supplied signed interval value. Fixes bug 13393. Create unit tests for format_time_interval().
-
- Oct 11, 2014
-
-
Roger Dingledine authored
-
- Oct 09, 2014
-
-
Nick Mathewson authored
The versions which this function would keep from getting the guard flag are already blocked by the minimum version check. Closes 13152.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
- Oct 08, 2014
-
-
Nick Mathewson authored
Merge remote-tracking branches 'teor/issue-13161-test-network' and 'teor/issue-13161-TestingDirAuthVoteExit'
-
Nick Mathewson authored
-
- Oct 07, 2014
-
-
teor authored
Bitwise check for the BRIDGE_DIRINFO flag, rather than checking for equality. Fixes a (potential) bug where directories offering BRIDGE_DIRINFO, and some other flag (i.e. microdescriptors or extrainfo), would be ignored when looking for bridge directories. Final fix in series for bug 13163.
-
teor authored
Document usage of the NO_DIRINFO and ALL_DIRINFO flags clearly in functions which take them as arguments. Replace 0 with NO_DIRINFO in a function call for clarity. Seeks to prevent future issues like 13163.
-
teor authored
Stop using the default authorities in networks which provide both AlternateDirAuthority and AlternateBridgeAuthority. This bug occurred due to an ambiguity around the use of NO_DIRINFO. (Does it mean "any" or "none"?) Partially fixes bug 13163.
-
- Oct 04, 2014
-
-
teor authored
Preserve previous semantics of src/test/test-network.sh by exiting with the exit status of chutney verify, even though the latest version ends with chutney stop.
-
Roger Dingledine authored
-
teor authored
If (GNU) Make 3.81 is running processes in parallel using -j2 (or more), it waits until all descendent processes have exited before it returns to the shell. When a command like "make -j2 test-network" is run, this means that test-network.sh apparently hangs until it either make is forcibly terminated, or all the chutney-launched tor processes have exited. A workaround is to use make without -j, or make -j1 if there is an existing alias to "make -jn" in the shell. We resolve this bug in tor by using "chutney stop" after "chutney verify" in test-network.sh.
-
- Oct 03, 2014
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
Also, make sure we will compile correctly on systems where they finally rip it out. Fixes issue #13325. Caused by this openbsd commit: http://marc.info/?l=openbsd-cvs&m=140768179627976&w=2 Reported by Fredzupy.
-
- Oct 01, 2014
-
-
teor authored
Add a --delay option to test-network.sh, which configures the delay before the chutney network tests for data transmission. The default remains at 18 seconds if the argument isn't specified. Apparently we should be using bootstrap status for this (eventually). Partially implements ticket 13161.
-
teor authored
The default shell on OS X is bash, which has a builtin echo. When called in "sh" mode, this echo does not accept "-n". This patch uses "/bin/echo -n" instead. Partially fixes issue 13161.
-
teor authored
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.
-
- Sep 29, 2014
-
-
Nick Mathewson authored
Closes 11582; patch from "ra".
-
Roger Dingledine authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
Fixes bug 13295; bugfix on 0.2.5.3-alpha. The alternative here is to call crypto_global_init() from tor-resolve, but let's avoid linking openssl into tor-resolve for as long as we can.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-