dana koch
f49805b681
Restitute a successful stat call to this test case.
...
Since the first stat call is made for it to deliberately fail, and we
reference st.st_mode without st having valid data, st.st_mode can contain
garbage and cause chmod to fail with EINVAL. We rerun stat and ensure it
succeeded.
Also make use of tt_abort_perror, to properly convey failure reasons to
the user.
2014-02-17 22:55:40 +00:00
dana koch
8999150f71
Appropriately condition the _le64toh macro definition for OpenBSD.
...
This corrects a linker error on OpenBSD, where the function is called letoh64. See also http://git.kernel.org/cgit/docs/man-pages/man-pages.git/tree/man3/endian.3#n84 .
2014-02-17 22:42:19 +00:00
Nick Mathewson
e1deb01e5f
mingw fix: Rename a variable in the unit tests
...
Apparently, MS C is #defining "IN" on us, so we can't name a
variable IN. Delightful!
2014-02-16 12:51:35 -05:00
Nick Mathewson
3dfed0806c
Merge remote-tracking branch 'public/bug10722'
2014-02-16 12:13:12 -05:00
Nick Mathewson
b5d6e47002
Warning message when bug 10722 would trigger
...
If somebody's excludenodes settings are keeping their hidden service
connections from working, they should probably get notified about it.
2014-02-16 12:11:07 -05:00
Nick Mathewson
35423d397f
Merge branch 'bug4900_siphash_v2'
2014-02-15 15:59:10 -05:00
Nick Mathewson
1ad6dd0dbe
Remove string hash in ht.h so we can't accidentally use it
2014-02-15 15:45:38 -05:00
Nick Mathewson
b3a6907493
Remove a bunch of functions that were never called.
2014-02-15 15:33:34 -05:00
Nick Mathewson
67749475f5
Merge remote-tracking branch 'public/bug10841'
2014-02-15 15:06:06 -05:00
Nick Mathewson
9d0af78e3c
Merge remote-tracking branch 'karsten/mmdb-convert'
2014-02-15 00:08:36 -05:00
Nick Mathewson
c64b549621
Merge remote-tracking branch 'origin/maint-0.2.4'
2014-02-15 00:07:15 -05:00
Nick Mathewson
bc58bfda70
Merge remote-tracking branch 'karsten/geoip6-feb2014' into maint-0.2.4
2014-02-15 00:06:40 -05:00
Nick Mathewson
260b3b1a19
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
2014-02-15 00:06:25 -05:00
Nick Mathewson
405d055465
Merge remote-tracking branch 'karsten/geoip-feb2014' into maint-0.2.3
2014-02-15 00:06:01 -05:00
Nick Mathewson
339a47e80b
Merge remote-tracking branch 'origin/maint-0.2.4'
2014-02-15 00:03:29 -05:00
Nick Mathewson
e4bc757cde
changes file for bug 10904
2014-02-14 23:51:14 -05:00
Sebastian Hahn
3f567f529f
gcc/clang: Mark macro-generated functions as possible unused
...
clang 3.4 introduced a new by-default warning about unused static
functions, which we triggered heavily for the hashtable and map function
generating macros. We can use __attribute__ ((unused)) (thanks nickm for
the suggestion :-) ) to silence these warnings.
2014-02-14 23:43:15 -05:00
Nick Mathewson
ac5ae794bd
tristate->enum in rendcommon functions
...
When we have more than two return values, we should really be using
an enum rather than "-2 means this, -1 means that, 0 means this, and
1 or more means a number."
2014-02-14 23:23:53 -05:00
Nick Mathewson
1987894626
fix a whitespace snafu
2014-02-14 23:00:04 -05:00
Karsten Loesing
c024ff8671
Remove another unused v0 hidserv function.
...
Noted by Nick on #10841 .
2014-02-14 17:54:16 +01:00
Karsten Loesing
f6f691df73
Update geoip6 to the February 2014 GeoIP database.
2014-02-13 19:04:51 +01:00
Karsten Loesing
436f7106b4
Exclude Teredo IPv6 prefix from geoip6.
...
The latest GeoLite2 database includes a pointer from 2001::/32 to the root
node of the IPv4 address space in the tree. We need to exclude this whole
address space from geoip6, similar to how we exclude IPv4-mapped IPv6
addresses and the 6to4 mapping subnet.
2014-02-13 18:58:21 +01:00
Roger Dingledine
745434d29a
bump to 0.2.5.2-alpha
2014-02-13 04:06:36 -05:00
Roger Dingledine
f63b394d90
give 0.2.5.2-alpha a release blurb
2014-02-13 03:49:46 -05:00
Roger Dingledine
8028d8fded
fold in the changes files to the new 0.2.5.2-alpha changelog
2014-02-13 02:46:26 -05:00
Nick Mathewson
79c234e0e3
On OOM, also log N circuits remaining
2014-02-12 13:09:02 -05:00
Nick Mathewson
c8d41da52d
More unit tests for OOM handling.
...
This gets us up to no interesting untested new or changed lines for
the 10169 code.
2014-02-12 12:50:16 -05:00
Nick Mathewson
48877e24a8
Initial unit tests for OOM handling
2014-02-12 12:49:56 -05:00
Nick Mathewson
9a07ec751f
Refactor OOM-handling functions for more testability
...
This patch splits out some of the functions in OOM handling so that
it's easier to check them without involving the rest of Tor or
requiring that the circuits be "wired up".
2014-02-12 12:48:20 -05:00
Nick Mathewson
52d222aafb
Add tests for buffer time tracking.
2014-02-12 12:48:11 -05:00
Nick Mathewson
d379fc6e0f
Several tests for buffer allocation
2014-02-12 12:48:00 -05:00
Nick Mathewson
f425cf8338
Start writing tests for 10169.
...
Now we cover more chunk allocation functions.
2014-02-12 12:47:49 -05:00
Nick Mathewson
eb6f433bdb
Debugging code inbuffers.c for debugging chunk allocation.
...
Currently on; will disable later in this branch.
2014-02-12 12:46:17 -05:00
Nick Mathewson
87fb1e324c
Merge remote-tracking branch 'public/bug10169_024' into bug10169_025_v2
...
Conflicts:
src/or/circuitlist.c
2014-02-12 12:44:58 -05:00
Nick Mathewson
05d8111eed
Merge remote-tracking branch 'public/bug10169_023' into bug10169_024
2014-02-12 12:39:15 -05:00
Nick Mathewson
fd28754dd3
Actually release buffer freelists when handling OOM conditions.
...
Otherwise freeing buffers won't help for a little while.
2014-02-12 12:38:20 -05:00
Nick Mathewson
7951591744
Fix bugs in bug10169 bugfix memory tracking
...
The chunk_grow() and chunk_copy() functions weren't adjusting the
memory totals properly.
Bugfix not on any released Tor version.
2014-02-12 12:37:41 -05:00
Nick Mathewson
10d1b0b33e
Changes file for feature4900
2014-02-12 12:20:29 -05:00
Nick Mathewson
c1e98c8afe
Randomize the global siphash key at startup
...
This completes our conversion to using siphash for our hash functions.
2014-02-12 12:12:58 -05:00
Nick Mathewson
d3fb846d8c
Split crypto_global_init() into pre/post config
...
It's increasingly apparent that we want to make sure we initialize our
PRNG nice and early, or else OpenSSL will do it for us. (OpenSSL
doesn't do _too_ bad a job, but it's nice to do it ourselves.)
We'll also need this for making sure we initialize the siphash key
before we do any hashes.
2014-02-12 12:04:07 -05:00
Nick Mathewson
0e97c8e23e
Siphash-2-4 is now our hash in nearly all cases.
...
I've made an exception for cases where I'm sure that users can't
influence the inputs. This is likely to cause a slowdown somewhere,
but it's safer to siphash everything and *then* look for cases to
optimize.
This patch doesn't actually get us any _benefit_ from siphash yet,
since we don't really randomize the key at any point.
2014-02-12 11:32:10 -05:00
Nick Mathewson
f05820531a
csiphash: Add functions to take a global key.
2014-02-12 11:27:41 -05:00
Nick Mathewson
f51df9bb93
Tests for siphash, from reference implementation.
2014-02-12 10:58:03 -05:00
Nick Mathewson
1bd86b69b6
csiphash: avoid unaligned access on non-x86
2014-02-12 10:57:46 -05:00
Nick Mathewson
9605978eb6
Get csiphash better integrated with our build system
2014-02-12 10:24:04 -05:00
Nick Mathewson
f4656c0cc9
Raw import of Marek Majkowski's cisphash.c
...
siphash is a hash function designed for producing hard-to-predict
64-bit outputs from short inputs and a 128-bit key. It's chosen for
security and speed.
See https://131002.net/siphash/ for more information on siphash.
Source: https://github.com/majek/csiphash/
2014-02-12 10:09:45 -05:00
Nick Mathewson
2c0088b8aa
Merge remote-tracking branch 'origin/maint-0.2.4'
2014-02-12 09:17:11 -05:00
Nick Mathewson
d6e6eaba60
Fix windows compilation of e0c8031516
...
There is no WSAEPERM; we were implying that there was.This fixes a
bug in e0c8031516
, which hadn't yet
appeared in any released Tor.
2014-02-12 09:16:22 -05:00
Karsten Loesing
74c2bff781
Remove remaining v0 hidden service descriptor code.
...
Fixes the rest of #10841 after #10881 already removed some hidden service
authority code.
2014-02-12 14:36:08 +01:00
Roger Dingledine
1ccc282122
add a missing word to the man page
2014-02-12 04:01:59 -05:00