Nick Mathewson
6f7eb7a0a5
Remove needless fd var from test. CID 1130989.
2013-11-22 12:16:17 -05:00
Nick Mathewson
6cbd17470d
Handle unlikely negative time in tor_log_err_sigsafe
...
Coverity wants this; CID 1130990.
2013-11-22 12:14:11 -05:00
Nick Mathewson
647248729f
Drop the MaxMemInQueues lower limit down to 256 MB.
...
on #9686 , gmorehose reports that the 500 MB lower limit is too high
for raspberry pi users.
2013-11-20 12:13:30 -05:00
Nick Mathewson
e572ec856d
Rename MaxMemInCellQueues to MaxMemInQueues
2013-11-20 12:12:23 -05:00
Nick Mathewson
a406f6d0f0
doxygen comments for 10169 code
2013-11-20 12:05:36 -05:00
Nick Mathewson
eabcab2b7c
Count freed buffer bytes from buffers when oom-killing circuits.
...
Also, aggressively clear the buffers to try to make their bytes go
away fast rather than waiting for the close-marked-connection code
to get 'em.
2013-11-20 11:57:45 -05:00
Nick Mathewson
027f4c82eb
Whitespace cleanup
2013-11-20 11:05:00 -05:00
Nick Mathewson
03da9be2f1
Merge remote-tracking branch 'sysrqb/bug9859_5'
2013-11-20 11:03:37 -05:00
Nick Mathewson
e7165659e0
Fix crypto/digests test
2013-11-18 13:33:29 -05:00
Nick Mathewson
a7c9d64fd6
Merge branch 'finish_prop157'
2013-11-18 13:27:06 -05:00
Nick Mathewson
ec9d88e5a2
Tweak #10162 documentation a bit
2013-11-18 13:26:58 -05:00
Nick Mathewson
3cdd7966d7
Add a _GNU_SOURCE definition to backtrace.c to fix compilation
2013-11-18 13:05:23 -05:00
Nick Mathewson
9025423471
Whoops -- add missing defined().
2013-11-18 11:36:23 -05:00
Nick Mathewson
93c99508d2
Make header includes match declarations in pc_from_ucontext.m4
...
With any luck, this will clean up errors where we detect that
REG_{EIP,RIP} is present in autoconf, but when we go to include it,
it isn't there.
2013-11-18 11:34:15 -05:00
Nick Mathewson
adf2fa9b49
Fix compilation under openssl 0.9.8
...
It's not nice to talk about NID_aes_{128,256}_{ctr,gcm} when they
don't exist.
Fix on 84458b79a78ea7e26820bf0; bug not in any released Tor.
2013-11-18 11:25:07 -05:00
Nick Mathewson
bd25bda7c0
Remove 'struct timeval now' that was shadowing 'struct timeval now'.
...
This was a mistake in the merge commit 7a2b30fe16
. It
would have made the CellStatistics code give completely bogus
results. Bug not in any released Tor.
2013-11-18 11:20:35 -05:00
Nick Mathewson
4b9ec85e47
Fix whitespace
2013-11-18 11:13:40 -05:00
Nick Mathewson
84458b79a7
Log more OpenSSL engine statuses at startup.
...
Fixes ticket 10043; patch from Joshua Datko.
2013-11-18 11:12:24 -05:00
Nick Mathewson
fbc20294aa
Merge branch 'backtrace_squashed'
...
Conflicts:
src/common/sandbox.c
src/common/sandbox.h
src/common/util.c
src/or/main.c
src/test/include.am
src/test/test.c
2013-11-18 11:00:16 -05:00
Nick Mathewson
c2dfae78d3
Refactor format_*_number_sigsafe to have a common implementation
2013-11-18 10:43:16 -05:00
Nick Mathewson
c3ea946839
Reseolve DOCDOC and XXXXs in backtrace.c
2013-11-18 10:43:15 -05:00
Nick Mathewson
56e3f056e9
Tests for backtrace.c
...
These need to be a separate executable, since the point of backtrace.c
is that it can crash and write stuff.
2013-11-18 10:43:15 -05:00
Nick Mathewson
0cf234317f
Unit tests for new functions in log.c
2013-11-18 10:43:15 -05:00
Nick Mathewson
d631ddfb59
Make backtrace handler handle signals correctly.
...
This meant moving a fair bit of code around, and writing a signal
cleanup function. Still pretty nice from what I can tell, though.
2013-11-18 10:43:15 -05:00
Nick Mathewson
ce8ae49c94
Improve new assertion message logging
...
Don't report that a failure happened in the assertion_failed function just
because we logged it from there.
2013-11-18 10:43:15 -05:00
Nick Mathewson
bd8ad674b9
Add a sighandler-safe logging mechanism
...
We had accidentially grown two fake ones: one for backtrace.c, and one
for sandbox.c. Let's do this properly instead.
Now, when we configure logs, we keep track of fds that should get told
about bad stuff happening from signal handlers. There's another entry
point for these that avoids using non-signal-handler-safe functions.
2013-11-18 10:43:15 -05:00
Nick Mathewson
063bea58bc
Basic backtrace ability
...
On platforms with the backtrace/backtrace_symbols_fd interface, Tor
can now dump stack traces on assertion failure. By default, I log
them to DataDir/stack_dump and to stderr.
2013-11-18 10:43:14 -05:00
Nick Mathewson
91ec6f7269
Have the OOM handler also count the age the data in a stream buffer
2013-11-15 18:38:52 -05:00
Nick Mathewson
7a2b30fe16
Merge remote-tracking branch 'origin/maint-0.2.4'
...
Conflicts:
src/or/relay.c
Conflict changes were easy; compilation fixes required were using
using TOR_SIMPLEQ_FIRST to get head of cell queue.
2013-11-15 15:35:00 -05:00
Nick Mathewson
59f50c80d4
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
...
Conflicts:
src/or/or.h
src/or/relay.c
Conflicts were simple to resolve. More fixes were needed for
compilation, including: reinstating the tv_to_msec function, and renaming
*_conn_cells to *_chan_cells.
2013-11-15 15:29:24 -05:00
Nick Mathewson
f6e07c158f
Make the dir-key-crosscert element required
...
In proposal 157, we added a cross-certification element for
directory authority certificates. We implemented it in
0.2.1.9-alpha. All Tor directory authorities now generate it.
Here, as planned, make it required, so that we can finally close
proposal 157.
The biggest change in the code is in the unit test data, where some
old hardcoded certs that we made long ago have become no longer
valid and now need to be replaced.
2013-11-14 09:37:41 -05:00
Nick Mathewson
4aa9affec2
Fix test_cmdline_args to work with old openssl
...
If openssl was old, Tor would add a warning about its version in
between saying "no torrc found, using reasonable defaults" and
"configuration was valid".
2013-11-11 15:22:08 -05:00
Nick Mathewson
fc5a881bd3
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-11-10 12:24:12 -05:00
Nick Mathewson
8bfa596c15
Fix two more DirServer mentions in log
2013-11-10 12:23:56 -05:00
Nick Mathewson
56ac75b265
Fix a wide line
2013-11-10 12:22:34 -05:00
Nick Mathewson
532f70a807
Change documentation DirServer->DirAuthority
...
We renamed the option, but we didn't actually fix it in the log
messages or the docs. This patch does that.
For #10124 . Patch by sqrt2.
2013-11-10 12:21:23 -05:00
Nick Mathewson
940d286a74
Documentation and tests for 10060
2013-11-07 14:42:58 -05:00
rl1987
86cfc64d45
Implementing --allow-missing-torrc CLI option.
2013-11-07 14:26:05 -05:00
Nick Mathewson
1b8ceb83c9
Improved circuit queue out-of-memory handler
...
Previously, when we ran low on memory, we'd close whichever circuits
had the most queued cells. Now, we close those that have the
*oldest* queued cells, on the theory that those are most responsible
for us running low on memory, and that those are the least likely to
actually drain on their own if we wait a little longer.
Based on analysis from a forthcoming paper by Jansen, Tschorsch,
Johnson, and Scheuermann. Fixes bug 9093.
2013-11-07 12:15:30 -05:00
Nick Mathewson
12dc55f487
Merge branch 'prop221_squashed_024'
...
Conflicts:
src/or/or.h
2013-11-01 10:28:01 -04:00
Nick Mathewson
5de88dda0a
circuit_build_failed: distinguish "got DESTROY" case
...
Roger spotted this on tor-dev in his comments on proposal 221.
We etect DESTROY vs everything else, since arma likes network
timeout indicating failure but not overload indicating failure.
2013-11-01 10:04:48 -04:00
Nick Mathewson
0de71bf8eb
Implement proposal 221: Stop sending CREATE_FAST
...
This makes FastFirstHopPK an AUTOBOOL; makes the default "auto"; and
makes the behavior of "auto" be "look at the consensus."
2013-11-01 10:04:48 -04:00
Nick Mathewson
5cc155e02a
Merge remote-tracking branch 'public/bug9645' into maint-0.2.4
2013-10-31 16:09:41 -04:00
Nick Mathewson
275ab61ad4
Appease make check-spaces
2013-10-31 14:45:20 -04:00
Nick Mathewson
9bcd93a364
Merge remote-tracking branch 'public/bug10063'
2013-10-31 14:43:20 -04:00
Nick Mathewson
761ee93c69
Add missing includes for circpathbias.h
2013-10-31 14:33:34 -04:00
Nick Mathewson
8f793c38fb
Move other #9731 check to start of its functions
...
At arma's suggestion. Looks like I missed this one.
2013-10-31 14:29:18 -04:00
Nick Mathewson
5cba0ddfc4
Make circpathbias and circuitbuild compile.
...
That was the tricky part
2013-10-31 14:28:49 -04:00
Nick Mathewson
b4ebf8421a
Move pathbias functions into a new file.
...
Does not compile yet. This is the "no code changed" diff.
2013-10-31 14:17:49 -04:00
Nick Mathewson
96f92f2062
Move #9731 checks to start of their functions
...
At arma's suggestion.
2013-10-31 14:10:23 -04:00