Nick Mathewson [Fri, 27 Sep 2013 15:54:36 +0000 (11:54 -0400)]
Faster circuit_get_by_rend_token_and_purpose()
On busy servers, this function takes up something like 3-7% in
different profiles, and gets invoked every time we need to participate
as the midpoint in a hidden service.
So maybe walking through a linked list of all the circuits here wasn't
a good idea.
There is no WSAEPERM; we were implying that there was.This fixes a
bug in e0c8031516852143fb82d8fee91a0f4c576c7418, which hadn't yet
appeared in any released Tor.
Karsten Loesing [Tue, 11 Feb 2014 07:44:35 +0000 (08:44 +0100)]
Add changes file for ticket 10842.
This is a bugfix on 0.2.2.26-beta, because 6b83b3b made directory
authorities remove themselves from the list of directory authorities to
upload to, but didn't suppress the warning in case they're the only
directory authority in the network.
Nick Mathewson [Fri, 7 Feb 2014 22:36:11 +0000 (17:36 -0500)]
Survive fedora's openssl in our benchmarks
Apparently fedora currently has ECDH but not P224. This isn't a huge
deal, since we no longer use OpenSSL's P224 ever (see #9780 and 72c1e5acfe1c6). But we shouldn't have segfaulting benchmarks really.
Nick Mathewson [Fri, 7 Feb 2014 17:01:16 +0000 (12:01 -0500)]
Remove a needless check in channel_tls_handle_incoming
This patch removes an "if (chan)" that occurred at a place where
chan was definitely non-NULL. Having it there made some static
analysis tools conclude that we were up to shenanigans.
Nick Mathewson [Thu, 6 Feb 2014 22:08:50 +0000 (17:08 -0500)]
Discard circuit paths on which nobody supports ntor
Right now this accounts for about 1% of circuits over all, but if you
pick a guard that's running 0.2.3, it will be about 6% of the circuits
running through that guard.
Making sure that every circuit has at least one ntor link means that
we're getting plausibly good forward secrecy on every circuit.
Nick Mathewson [Fri, 17 Jan 2014 18:39:04 +0000 (13:39 -0500)]
Make the handling for usable-exit counting handle ExitNodes better
It's possible to set your ExitNodes to contains only exits that don't
have the Exit flag. If you do that, we'll decide that 0 of your exits
are working. Instead, in that case we should look at nodes which have
(or which might have) exit policies that don't reject everything.
Nick Mathewson [Mon, 3 Feb 2014 21:12:30 +0000 (16:12 -0500)]
Clean up test_hs.c: warning fix; tor_free() usage.
My OSX laptop rightly gave a warning because of sticking strlen() into
an int, but once I took a closer look... it appears that the strlen()
was part of a needlessly verbose implementation for tor_strdup().
While I was there, I fixed the usage of tor_free() in test_hs.c: It
checks for NULL, and it zeros its argument. So instead of
if (foo) {
tor_free(foo);
foo = NULL;
}
we should just say
tor_free(foo);
Nick Mathewson [Mon, 3 Feb 2014 16:34:13 +0000 (11:34 -0500)]
slownacl's pure-python curve25519 lets us test ntor everywhere.
Improvement on f308adf8382bc7e61ea05a172, where we made the ntor
unit tests run everywhere... so long as a python curve25519 module
was installed. Now the unit tests don't require that module.
Nick Mathewson [Sun, 2 Feb 2014 20:45:00 +0000 (15:45 -0500)]
Move the friendly warning about TPROXY and root to EPERM time
I'm doing this because:
* User doesn't mean you're running as root, and running as root
doesn't mean you've set User.
* It's possible that the user has done some other
capability-based hack to retain the necessary privileges.
Nick Mathewson [Wed, 29 Jan 2014 20:17:05 +0000 (15:17 -0500)]
Rip out all of the v2 directory code.
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.
Nick Mathewson [Fri, 24 Jan 2014 17:56:10 +0000 (12:56 -0500)]
Apply StrictNodes to hidden service directories early
Previously, we would sometimes decide in directory_get_from_hs_dir()
to connect to an excluded node, and then later in
directory_initiate_command_routerstatus_rend() notice that it was
excluded and strictnodes was set, and catch it as a stopgap.
Additionally, this patch preferentially tries to fetch from
non-excluded nodes even when StrictNodes is off.
Fix for bug #10722. Bugfix on 0.2.0.10-alpha (the v2 hidserv directory
system was introduced in e136f00ca). Reported by "mr-4".