Nick Mathewson
ef9c34688c
r15273@tombo: nickm | 2008-04-22 12:32:28 -0400
...
apply patch from lodger: reject requests for reverse-dns lookup of names in private address space. make non-exits reject all dns requests. Fixes bug 619.
svn:r14410
2008-04-22 16:32:55 +00:00
Nick Mathewson
6e979489dc
r15269@tombo: nickm | 2008-04-22 12:23:30 -0400
...
Fix bug 663: warn less verbosely about clock skew from netinfo cells
svn:r14408
2008-04-22 16:23:47 +00:00
Nick Mathewson
299014b2c7
r15251@tombo: nickm | 2008-04-22 11:59:46 -0400
...
On platforms using pthreads, allow a thread to acquire a lock it already holds. This is crucial for logging: otherwise any log message thrown from inside the logging process (especially from control.c) will deadlock. Win32 CriticalSections are already recursive. Bug spotted by nwf. Bugfix on 0.2.0.16-alpha. Backport candidate. I hope this is portable.
svn:r14406
2008-04-22 15:59:59 +00:00
Peter Palfrader
0cbecbe050
Fix a pair of comments
...
svn:r14405
2008-04-22 15:20:46 +00:00
Nick Mathewson
1b9c06ab96
r15230@tombo: nickm | 2008-04-17 16:18:08 -0400
...
Do not allocate excess space for named_flag and unnamed_flag in dirvote.c. Fixes bug 662. Not a dangerous bug: sizeof(int*) is at least as big as sizeof(int) everywhere.
svn:r14391
2008-04-17 20:23:13 +00:00
Roger Dingledine
5e299b5e01
minor fixes that have been accumulating
...
svn:r14378
2008-04-16 00:12:44 +00:00
Roger Dingledine
2b4ff1718f
forward-port r14375 and try to make it less likely to happen again
...
svn:r14377
2008-04-16 00:10:39 +00:00
Roger Dingledine
20f927c2dd
forward-port r14373
...
svn:r14374
2008-04-15 23:06:31 +00:00
Nick Mathewson
b927ede48c
r15161@31-33-107: nickm | 2008-04-10 11:11:58 -0400
...
Make dumpstats() log the size and fullness of openssl-internal buffers, so I can test my hypothesis that many of them are empty, and my alternative hypothesis that many of them are mostly empty, against the null hypothesis that we really need to be burning 32K per open OR connection on this.
svn:r14350
2008-04-10 15:12:24 +00:00
Nick Mathewson
20cf4d1f09
r19283@catbus: nickm | 2008-04-09 21:44:18 -0400
...
The optimist calls the glass half full. The pessimist calls it half empty. The engineer says it is twice as large as it needs to be. In this case, the engineer says that the default smartlist size is twice as large as it needs to be and wouldn't it be nice to save half a megabyte with a one-line patch?
svn:r14341
2008-04-10 01:44:23 +00:00
Nick Mathewson
4901ee0a8c
r19273@catbus: nickm | 2008-04-09 14:44:23 -0400
...
Do a slightly better fix for r14329: don't call time() quite so much. Also note the time(NULL) hack we wanted to do in the TODO.
svn:r14334
2008-04-09 18:44:50 +00:00
Nick Mathewson
186df044cd
r19262@catbus: nickm | 2008-04-09 14:05:20 -0400
...
When writing relay cells to a buffer, update timestamp_last_added_nonpadding. Bugfix on 0.2.0.1-alpha. Backport candidate.
svn:r14329
2008-04-09 18:05:47 +00:00
Nick Mathewson
cc7a8a63b1
r15120@tombo: nickm | 2008-04-08 18:01:58 -0400
...
Add very short 0.2.1.x list based on discussion from arma. needs fleshing out and merging with other lists.
svn:r14324
2008-04-08 22:02:08 +00:00
Nick Mathewson
98aea7186c
r19249@catbus: nickm | 2008-04-08 14:04:02 -0400
...
Oops. Fix one last memarea freelist bug.
svn:r14322
2008-04-08 18:04:05 +00:00
Nick Mathewson
a725d5da5e
r19247@catbus: nickm | 2008-04-08 13:50:01 -0400
...
Fix behavior of memarea freelists.
svn:r14321
2008-04-08 17:50:03 +00:00
Nick Mathewson
f8bacfd724
r19245@catbus: nickm | 2008-04-08 13:33:27 -0400
...
Oops. It turns out that there are some subtle differences between >= and <.
svn:r14320
2008-04-08 17:33:29 +00:00
Nick Mathewson
31153d6374
r19243@catbus: nickm | 2008-04-08 13:28:59 -0400
...
Use a freelist to hold a few recent memarea chunks. We do a kazillion memarea allocs and frees; that cant be good for us.
svn:r14319
2008-04-08 17:29:05 +00:00
Nick Mathewson
a627407fcb
r19233@catbus: nickm | 2008-04-08 13:06:34 -0400
...
When we remove old routers, use Bloom filters rather than a digestmap-based set in order to tell which ones we absolutely need to keep. This will save us roughly a kazillion little short-lived allocations for hash table entries.
svn:r14318
2008-04-08 17:06:41 +00:00
Nick Mathewson
0c9efd6a1e
r19231@catbus: nickm | 2008-04-07 12:45:58 -0400
...
Update last_listed_as_valid_until for new routers based on v2 networkstatus as well as consensus networkstatus.
svn:r14317
2008-04-08 17:06:38 +00:00
Nick Mathewson
2d68487e7f
r19229@catbus: nickm | 2008-04-07 12:28:22 -0400
...
Add a new SMARTLIST_FOREACH_JOIN macro to iterate through two sorted lists in lockstep. This happens at least 3 times in the code so far, and is likely to happen more in the future. Previous attempts to do so proved touchy, tricky, and error-prone: now, we only need to get it right in one place.
svn:r14309
2008-04-07 16:28:34 +00:00
Nick Mathewson
85db675911
r19202@catbus: nickm | 2008-04-04 17:18:47 -0400
...
Make last_served_at optional; make last_listed_as_valid_until take account (partially) of v2 statuses.
svn:r14299
2008-04-04 21:18:56 +00:00
Nick Mathewson
4c04b7f4f6
r19201@catbus: nickm | 2008-04-04 14:23:19 -0400
...
Better macro documentation
svn:r14298
2008-04-04 21:18:51 +00:00
Nick Mathewson
68407e6a9c
r19199@catbus: nickm | 2008-04-03 15:01:05 -0400
...
Fix bug 641 and 650, I think.
svn:r14297
2008-04-03 19:01:16 +00:00
Roger Dingledine
1ac11591d2
a potential fix for bug 641.
...
svn:r14281
2008-04-02 20:48:36 +00:00
Roger Dingledine
39c402c29f
when add_file_log() fails, tell us why.
...
svn:r14277
2008-04-01 21:05:31 +00:00
Nick Mathewson
d43a9d9440
r19152@catbus: nickm | 2008-03-30 23:20:11 -0400
...
Make unit tests pass again after Link protocol list change.
svn:r14254
2008-03-31 03:20:55 +00:00
Nick Mathewson
006530f037
r19140@catbus: nickm | 2008-03-30 14:13:36 -0400
...
Note in our router descriptors that we actually support link protocol version 2, now that it seems to work.
svn:r14246
2008-03-30 18:14:55 +00:00
Nick Mathewson
72ca7e5d88
r19138@catbus: nickm | 2008-03-30 11:59:26 -0400
...
oops; fix bug in descriptor metric logic.
svn:r14245
2008-03-30 15:59:32 +00:00
Nick Mathewson
e19d96637d
r19118@catbus: nickm | 2008-03-29 00:27:08 -0400
...
Code (disabled) to get way too much info about the contents of old_routers on USR1.
svn:r14230
2008-03-29 04:27:34 +00:00
Nick Mathewson
e89bf1c573
r19109@catbus: nickm | 2008-03-27 16:05:18 -0400
...
Replace a syntax error and a log message that was never emitted with a simple assert. Asserts are fun and easy.
svn:r14224
2008-03-27 20:05:44 +00:00
Peter Palfrader
9d132fbde6
Add --hush switch.
...
New --hush command-line option similar to --quiet. While --quiet disables all
logging to the console on startup, --hush limits the output to messages of
warning and error severity.
svn:r14222
2008-03-27 17:25:49 +00:00
Nick Mathewson
968ad93b0a
r19093@catbus: nickm | 2008-03-27 12:43:58 -0400
...
Only log a notice that dmalloc has been set up if it fails. Actually, since we have not added a temp log yet, I am not sure this ever does anything.
svn:r14216
2008-03-27 16:46:39 +00:00
Nick Mathewson
4e6b6e3ad7
r19092@catbus: nickm | 2008-03-27 12:43:29 -0400
...
Stop supporting anything besides CMD_RUN_TOR in ntmain.c. Based on patch from Sebastian Hahn.
svn:r14215
2008-03-27 16:46:36 +00:00
Nick Mathewson
12b217bce8
r19091@catbus: nickm | 2008-03-27 12:42:57 -0400
...
Stop reading torrc when all we want to do is --hash-password. Fix based on patch from Sebastian Hahn. Backport candidate.
svn:r14214
2008-03-27 16:46:34 +00:00
Nick Mathewson
02acee891c
r19089@catbus: nickm | 2008-03-27 11:05:23 -0400
...
Free some static hashtables and the log mutex on exit. Backport candidate.
svn:r14212
2008-03-27 15:05:28 +00:00
Nick Mathewson
fa15ed4b7b
r19079@catbus: nickm | 2008-03-26 17:16:46 -0400
...
Free authority certs on exit. Backport candidate.
svn:r14205
2008-03-26 21:16:56 +00:00
Nick Mathewson
944bd3dbed
r19074@catbus: nickm | 2008-03-26 17:08:32 -0400
...
Start new address policies with refcount of 1, not 2. Backport candidate once tested more.
svn:r14204
2008-03-26 21:08:39 +00:00
Roger Dingledine
e9221f4a0d
fix a leak when adding a temp log
...
svn:r14203
2008-03-26 18:59:45 +00:00
Roger Dingledine
8dfccf6145
fix mem leak in parsing log config lines
...
svn:r14202
2008-03-26 18:36:46 +00:00
Nick Mathewson
e8cc756c13
r19072@catbus: nickm | 2008-03-26 13:50:24 -0400
...
Add code to debug memory area size. Use results of this code to set a couple of area sizes more sanely.
svn:r14201
2008-03-26 17:50:27 +00:00
Nick Mathewson
745f3c859a
r19066@catbus: nickm | 2008-03-26 13:24:15 -0400
...
Initialize logging before we log anything. Bugfix on 0.2.0.x-alpha.
svn:r14199
2008-03-26 17:25:16 +00:00
Nick Mathewson
762d82cf74
r19062@catbus: nickm | 2008-03-26 12:56:25 -0400
...
Fix whitespace
svn:r14197
2008-03-26 16:56:37 +00:00
Nick Mathewson
3af9e099f7
r19061@catbus: nickm | 2008-03-26 12:53:18 -0400
...
Now that every thing in routerparse.c is switched over to use memareas, there is no need to keep the heap-allocated token code.
svn:r14196
2008-03-26 16:56:34 +00:00
Nick Mathewson
6edab8569a
r19060@catbus: nickm | 2008-03-26 12:44:19 -0400
...
Make v2 hidden service descriptors use the new area allocation logic. This works for me, but Karsten should definitely have a look at it.
svn:r14195
2008-03-26 16:56:31 +00:00
Nick Mathewson
e4ebe3409e
r19049@catbus: nickm | 2008-03-26 12:33:25 -0400
...
Add new stacklike, free-all-at-once memory allocation strategy. Use it when parsing directory information. This helps parsing speed, and may well help fragmentation some too. hidden-service-related stuff still uses the old tokenizing strategies.
svn:r14194
2008-03-26 16:33:33 +00:00
Nick Mathewson
df6b256bc0
r19041@catbus: nickm | 2008-03-25 16:20:42 -0400
...
More unit tests to improve coverage.
svn:r14185
2008-03-25 20:20:45 +00:00
Nick Mathewson
41deb5cd7b
r19039@catbus: nickm | 2008-03-25 12:15:58 -0400
...
Add some unit tests, particularly for AES counter mode.
svn:r14180
2008-03-25 16:16:05 +00:00
Roger Dingledine
9047361007
Mar 24 08:43:30.014 [debug] circuit_find_to_cannibalize(): Hunting for
...
a circ to cannibalize: purpose 5, uptime 0, capacity 4, internal 0
svn:r14166
2008-03-24 18:43:01 +00:00
Roger Dingledine
901e2ad04b
correct a confusing log message
...
svn:r14165
2008-03-24 18:37:52 +00:00
Roger Dingledine
13174b8f97
fix r14162 so it was what i meant. sometimes precedence is surprising!
...
svn:r14164
2008-03-24 07:24:09 +00:00
Roger Dingledine
a9acdb8f53
when our onehop circuits were failing, nobody was telling the
...
streams. so they waited 120 seconds before timing out. this
was particularly bad during bootstrapping, if an authority is
down or not answering right.
svn:r14163
2008-03-24 05:48:51 +00:00
Roger Dingledine
c26c77d24d
If our create-fast cell is mysteriously never answered for a begindir
...
attempt, notice more quickly. Some of our bootstrapping attempts have a 60
second delay while we sit there wondering why we're getting no response.
svn:r14162
2008-03-24 03:50:21 +00:00
Roger Dingledine
662cecc251
and one more
...
svn:r14152
2008-03-21 22:01:11 +00:00
Roger Dingledine
52b267b987
make it build, too
...
svn:r14151
2008-03-21 21:59:57 +00:00
Nick Mathewson
b5b77f8bf3
r19004@catbus: nickm | 2008-03-21 15:18:43 -0400
...
Use RAND_poll() again: the bug that made us stop using it has been fixed.
svn:r14150
2008-03-21 19:18:57 +00:00
Roger Dingledine
7ed6406ce9
forward-port 14113-r14115
...
svn:r14116
2008-03-18 23:12:41 +00:00
Nick Mathewson
e96d22e914
r18941@catbus: nickm | 2008-03-18 14:59:43 -0400
...
Likely fix for bug 632: do not call start_reading on a placeholder connection.
svn:r14109
2008-03-18 19:00:12 +00:00
Nick Mathewson
a62a24036d
r18937@catbus: nickm | 2008-03-18 14:50:39 -0400
...
Fix the other lingering part of bug 617: make ClientDNSRejectInternalAddresses actually work.
svn:r14107
2008-03-18 18:51:34 +00:00
Nick Mathewson
7dd78f1576
r18929@catbus: nickm | 2008-03-18 12:08:16 -0400
...
Detect errors from directory listing correctly on win32. Bug found by lodger.
svn:r14102
2008-03-18 16:08:49 +00:00
Nick Mathewson
199d65d059
r18927@catbus: nickm | 2008-03-18 11:11:49 -0400
...
Combine common code in set_max_file_descriptors(): all that varies from platform to platform in the no-getrlimit() case is the connection limit and the platform name.
svn:r14101
2008-03-18 15:11:52 +00:00
Nick Mathewson
fba2599680
r18923@catbus: nickm | 2008-03-18 11:01:22 -0400
...
Add missing typecasts to log message in set_max_file_descriptors to tell gcc everything is okay on windows. Fixes bug 630.
svn:r14099
2008-03-18 15:01:36 +00:00
Nick Mathewson
05f5d778a2
r18919@catbus: nickm | 2008-03-18 10:53:38 -0400
...
Forward-port bug 622 fix as diagnosed by lodger.
svn:r14096
2008-03-18 14:53:41 +00:00
Nick Mathewson
ba915e4211
r18913@catbus: nickm | 2008-03-18 10:30:39 -0400
...
16, not 64.
svn:r14094
2008-03-18 14:30:46 +00:00
Roger Dingledine
31d185a23b
point out another bug for nick. and if it's *not* a bug, that's
...
stunning and i want to know why. :)
svn:r14088
2008-03-18 03:08:48 +00:00
Roger Dingledine
2117abbe3f
forward-port the 0.2.0.22-rc changelog entry, plus remove
...
some duplicate items.
svn:r14086
2008-03-18 02:39:34 +00:00
Nick Mathewson
fe1b2a4ed4
r18900@catbus: nickm | 2008-03-17 18:32:25 -0400
...
Fix tests and routerdesc behavior on trunk.
svn:r14084
2008-03-17 22:32:28 +00:00
Nick Mathewson
e17e6371d1
r18896@catbus: nickm | 2008-03-17 16:10:54 -0400
...
Fix bug in earlier bugfix. Note stupidness of allowing NULL policies at all. Disallow empty exit policies in router descriptors.
svn:r14082
2008-03-17 20:10:57 +00:00
Nick Mathewson
80ec9e51dd
r18891@catbus: nickm | 2008-03-17 13:20:20 -0400
...
Patch from Sebastian Hahn: give an error message on "error replacing old router store."
svn:r14080
2008-03-17 17:21:12 +00:00
Nick Mathewson
ea6f636e94
r18890@catbus: nickm | 2008-03-17 13:19:29 -0400
...
Clarify documentation for file_status a little
svn:r14079
2008-03-17 17:21:09 +00:00
Nick Mathewson
9a24158c69
r18880@catbus: nickm | 2008-03-17 12:51:24 -0400
...
Fix policy-related crash bug found by lodger.
svn:r14077
2008-03-17 16:51:48 +00:00
Peter Palfrader
0cccf7375b
And use 16k pages on ia64. Maybe this should be a configure thing
...
svn:r14073
2008-03-17 09:46:18 +00:00
Nick Mathewson
2ed4b818cb
r18878@catbus: nickm | 2008-03-17 00:11:02 -0400
...
Clean up an overwide line.
svn:r14072
2008-03-17 04:11:05 +00:00
Nick Mathewson
296289de82
r18873@catbus: nickm | 2008-03-17 00:06:31 -0400
...
oops. guard status logging change had a bug. it is non-obvious how to make the code perfect atm; just make it work.
svn:r14070
2008-03-17 04:07:56 +00:00
Nick Mathewson
e6b617bf05
r18872@catbus: nickm | 2008-03-16 23:56:48 -0400
...
Only dump all guard node status to the log when the guard node status actually changes. Downgrade the 4 most common remaining INFO log messages to DEBUG.
svn:r14069
2008-03-17 04:07:51 +00:00
Nick Mathewson
c59f66709d
r18862@catbus: nickm | 2008-03-16 23:33:11 -0400
...
Part of fix for bug 617: allow connection_ap_handshake_attach_circuit() to mark connections, to avoid double-mark warnings. Note that this is an incomplete refactoring.
svn:r14066
2008-03-17 03:37:54 +00:00
Nick Mathewson
bd547e3cfc
r18861@catbus: nickm | 2008-03-16 23:22:56 -0400
...
Fix a couple of bugs in setting control log callback severity.
svn:r14065
2008-03-17 03:37:52 +00:00
Nick Mathewson
0b941640df
r18852@catbus: nickm | 2008-03-16 22:47:19 -0400
...
Downgrade "sslv3 alert handshake failure" message to info.
svn:r14057
2008-03-17 02:47:49 +00:00
Nick Mathewson
b29f763ee1
r18850@catbus: nickm | 2008-03-16 22:35:38 -0400
...
Use 8k pages in openbsd malloc code on alpha. Bug and solution found by weasel. Also, when initializing openbsd malloc code, check that compiled page size matches output of getpagesize().
svn:r14056
2008-03-17 02:47:40 +00:00
Nick Mathewson
46155aca17
r18804@catbus: nickm | 2008-03-13 18:18:31 -0400
...
Refactor log domain mask code so that nobody outside of log.c has to use SEVERITY_MASK_IDX. It is error-prone.
svn:r14016
2008-03-13 22:18:38 +00:00
Nick Mathewson
d928e5685f
r18803@catbus: nickm | 2008-03-13 17:59:25 -0400
...
Fix behavior of switch_logs_debug() in trunk. Fixes bug 626. Bugfix on r13875.
svn:r14015
2008-03-13 22:18:36 +00:00
Nick Mathewson
0c6fc51909
r18793@catbus: nickm | 2008-03-13 14:09:19 -0400
...
Add a malloc_good_size() implementation to OpenBSD_malloc_Linux.c. Also, make configure.in not use support functions for the platform malloc when we are not using the platform mallocs.
svn:r14010
2008-03-13 18:11:33 +00:00
Peter Palfrader
e6b2d119e8
Assert that severity in logv() is sane. Interesting effects otherwise (It is being used as an array index)
...
svn:r14006
2008-03-13 16:56:14 +00:00
Peter Palfrader
925ba96508
downgrade get_interface_address6 logging severity to LOG_DEBUG.
...
get_interface_address6() fails regardless of the allocator used,
wever logging to the original severity of 0 causes an assert
error only with the bsd allocator. weird.
svn:r14005
2008-03-13 16:15:16 +00:00
Nick Mathewson
365f16b199
r18787@catbus: nickm | 2008-03-13 11:11:52 -0400
...
Make set-option functions return sensible error codes from an enum, not mysterious negative integers
svn:r14004
2008-03-13 15:11:56 +00:00
Peter Palfrader
24884bb3ed
Use proper log levels with get_interface_address6() calls so we do not die in an assert error because of invalid log levels. Should a failure here fail our test suite?
...
svn:r14003
2008-03-13 15:10:35 +00:00
Nick Mathewson
cad3d651d0
r18783@catbus: nickm | 2008-03-13 11:06:45 -0400
...
Oops, do a better fix for that.
svn:r14001
2008-03-13 15:06:49 +00:00
Nick Mathewson
ac6cc43047
r18781@catbus: nickm | 2008-03-13 11:00:51 -0400
...
Have OpenBSD_malloc_Linux.c use SIZE_T_MAX from torint.h, instead of checking cpu macros. There is always one more cpu you havent checked for.
svn:r14000
2008-03-13 15:06:26 +00:00
Peter Palfrader
3a92e3f15f
I wonder what the DISGARD service is
...
svn:r13999
2008-03-13 14:09:01 +00:00
Nick Mathewson
11e464c331
r18753@catbus: nickm | 2008-03-11 14:56:39 -0400
...
Make some assert()s into tor_assert()s. Make some tor_assert()s called from logging into assert()s, and document why.
svn:r13977
2008-03-11 18:56:41 +00:00
Nick Mathewson
4d32c2e81f
r18751@catbus: nickm | 2008-03-11 14:22:43 -0400
...
Fix for bug 614: always look at the network BIO for the SSL object, not at the buffering BIO (if one exists because we are renegotiating or something). Bugfix on 0.1.2.x, oddly enough, though it should be impossible to trigger the problem there. Backport candidate. See comments in tortls.c for detailed implementation note.
svn:r13975
2008-03-11 18:22:49 +00:00
Nick Mathewson
24f91d2876
r18747@catbus: nickm | 2008-03-11 13:21:25 -0400
...
Request client certs when renegotiating on server-side. Spotted by lodger. Bugfix on 0.2.0.x.
svn:r13973
2008-03-11 17:21:44 +00:00
Nick Mathewson
4b65ea0ec0
r18730@catbus: nickm | 2008-03-11 00:47:04 -0400
...
Forward-port: Fix the SVK version detection logic to work right on a branch: tolerate multiple "copied from" tags and only look at the first.
svn:r13959
2008-03-11 04:47:07 +00:00
Nick Mathewson
8b24e01599
r18723@catbus: nickm | 2008-03-11 00:25:30 -0400
...
Fix bug spotted by mwenge: a server_event should not be a sever_event. Also, fix compile errors in config.c and control.c with --enable-gcc-warnings.
svn:r13957
2008-03-11 04:30:14 +00:00
Peter Palfrader
2704a2e129
And appease the whitespace nazis among us
...
svn:r13950
2008-03-10 12:43:47 +00:00
Peter Palfrader
79f1ee8a2d
Implement LOADCONF control command
...
The LOADCONF control command allows posting a config file to Tor
over the control interface. This config file is then loaded as if
it had been read from disk. Sending a HUP signal to Tor will make
it try to load its old config from disk again, thereby forgetting
the config loaded with this command.
svn:r13948
2008-03-10 12:41:52 +00:00
Peter Palfrader
bc4095c70c
different exit codes for options_init_from_string()
...
Change options_init_from_string() so that it returns different exit codes in the
error case, depending on what went wrong. Also push the responsibility to log
the error to the caller.
svn:r13947
2008-03-10 12:41:49 +00:00
Peter Palfrader
8c71d7ea16
options_init_from_torrc(): split off options_init_from_string()
...
svn:r13946
2008-03-10 12:41:44 +00:00
Peter Palfrader
947fd064a3
Store options we got from commandline seperately from bare argv/argc
...
svn:r13945
2008-03-10 12:41:40 +00:00
Peter Palfrader
00d64fd213
options_init_from_torrc(): move code that loads torrc into its own function
...
move code that loads torrc from disk and sets torrc_fname into its own function
svn:r13944
2008-03-10 12:41:36 +00:00
Peter Palfrader
ded55fa296
options_init_from_torrc(): tread non-existing torrc like empty torrc.
...
Tread the case of a non-existing conffile, when allowed, exactly like the one
with an empty torrc.
svn:r13943
2008-03-10 12:41:33 +00:00
Peter Palfrader
e8f4d79ec1
options_init_from_torrc(): move code that looks for torrc into its own function
...
Part of options_init_from_torrc()'s job was looking for -f flags (to specify
an alternate config file) on the command line, complaining if more than one
is given or the given does not exist. If none is given then use the compiled-in
default location, accepting if it does not exist. This logic has been moved
into its own function in an attemped to make options_init_from_torrc() easier
to deal with.
svn:r13942
2008-03-10 12:41:29 +00:00
Peter Palfrader
4118e319c7
options_init_from_torrc(): Split argv processing into two parts
...
Split the argv processing loop into two poarts, one that deals with
figuring out which conffile to use, and the other that figures out
which "command" (hash fingerprint, verify config, list fpr, run tor)
the user asked for.
There is a third part further down that imports command line args
into the config but that is not touched.
svn:r13941
2008-03-10 12:41:26 +00:00
Peter Palfrader
8987bd2fd9
If we decrement incoming_cmd's length when receiving the ending CRLF "." CRLF for a multi-line control command, also truncate the string by nul-terminating it in the correct place.
...
svn:r13939
2008-03-10 12:13:43 +00:00
Roger Dingledine
0df1564298
forward-port recent changes
...
svn:r13935
2008-03-10 07:50:09 +00:00
Nick Mathewson
7587e16796
r18639@catbus: nickm | 2008-03-07 20:11:48 -0500
...
Change semantics of add-a-log functions to copy severity setup: that is way less error-prone. Fix up config.c to act accordingly.
svn:r13888
2008-03-08 01:11:54 +00:00
Nick Mathewson
2675276618
r18638@catbus: nickm | 2008-03-07 20:11:15 -0500
...
Fix typo in tortls.c comment.
svn:r13887
2008-03-08 01:11:52 +00:00
Nick Mathewson
670f4c19af
r18632@catbus: nickm | 2008-03-05 17:38:52 -0500
...
Patch from karsten: proper error message from tor-gencert when no argument is given to --passphrase-fd
svn:r13876
2008-03-05 22:39:49 +00:00
Nick Mathewson
f56ba5f3d6
r18630@catbus: nickm | 2008-03-05 17:31:33 -0500
...
Implement domain-selection for logging. Source is documented; needs documentation in manpage (maybe). For now, see doxygen comment on parse_log_severity_config in log.c
svn:r13875
2008-03-05 22:31:39 +00:00
Peter Palfrader
9e7b4400dc
minor cleanup
...
in options_act() we set running_tor to options->command == CMD_RUN_TOR
once and used that in all but one place. Now we use running_tor in that
place also.
svn:r13819
2008-03-03 12:48:13 +00:00
Roger Dingledine
5bf0a01011
forward-port r13799 and the 0.2.0.21-rc changelog
...
svn:r13808
2008-03-02 22:29:04 +00:00
Roger Dingledine
cf3e1b1309
we should consider dumping the v1 directory stuff from 0.2.1.x.
...
perhaps we would even replace the v1 directory with a static
page saying 'this is a tor server, let me tell you what that is'.
svn:r13797
2008-03-01 17:47:41 +00:00
Nick Mathewson
77d1654c50
r18535@catbus: nickm | 2008-03-01 09:58:33 -0500
...
Whoo. People diagnosed and fixed bug 616. See changelog for details. Bugfix on 0.2.0.20-rc.
svn:r13793
2008-03-01 14:59:03 +00:00
Roger Dingledine
c5a7ff8e43
forward-port r13777
...
svn:r13778
2008-02-29 01:45:06 +00:00
Roger Dingledine
04efc74e18
be a little bit more helpful than "Error reading directory."
...
make a note to try to be more helpful still.
svn:r13776
2008-02-28 21:37:39 +00:00
Nick Mathewson
eefe2a3562
r18462@catbus: nickm | 2008-02-27 14:15:57 -0500
...
Add better warnings for the error that produced bug 614, and downgrade from a tor_assert() to a tor_fragile_assert().
svn:r13752
2008-02-27 19:19:34 +00:00
Nick Mathewson
d14f8f2547
r14516@tombo: nickm | 2008-02-27 03:10:26 -0500
...
Write some unit tests for a few functions and cases that needed them.
svn:r13751
2008-02-27 08:10:28 +00:00
Nick Mathewson
4ea982c4c0
r14481@tombo: nickm | 2008-02-26 14:49:04 -0500
...
Bump trunk version to 0.2.1.0-alpha-dev
svn:r13745
2008-02-26 19:49:28 +00:00
Roger Dingledine
52a1c244ca
bump to 0.2.0.20-rc-dev
...
svn:r13725
2008-02-25 06:51:18 +00:00
Roger Dingledine
3dd9a3a23a
bump to 0.2.0.20-rc
...
svn:r13715
2008-02-25 00:39:58 +00:00
Roger Dingledine
e7f3d6f76c
fix most of pnx's warnings on irix64
...
svn:r13706
2008-02-24 23:39:53 +00:00
Nick Mathewson
3452486ac6
r14422@tombo: nickm | 2008-02-24 17:09:56 -0500
...
Whitespace fixes
svn:r13700
2008-02-24 22:11:18 +00:00
Nick Mathewson
ee8dce3084
r14421@tombo: nickm | 2008-02-24 17:05:18 -0500
...
Patch from mwenge: always willingly serve our own extrainfo from the controlport
svn:r13699
2008-02-24 22:11:12 +00:00
Nick Mathewson
dde81de3dd
r14419@tombo: nickm | 2008-02-24 16:55:11 -0500
...
Patch from tup: use sizeof sockaddr_un as the size of a unix sockaddr. Fixes unix controlsocket binding on openbsd.
svn:r13697
2008-02-24 22:11:00 +00:00
Nick Mathewson
e0de72dd87
r14410@tombo: nickm | 2008-02-23 16:51:46 -0500
...
Fix the last of the -Wshorten-64-to-32 warnings.
svn:r13696
2008-02-24 22:10:08 +00:00
Roger Dingledine
a0bc80bbf8
<weasel> tortls.c: In function `tor_tls_client_is_using_v2_ciphers':
...
<weasel> tortls.c:634: warning: passing arg 1 of `SSL_get_session' discards
qualifiers from pointer target type
Nick, see if you like this patch.
svn:r13690
2008-02-24 00:35:20 +00:00
Roger Dingledine
31f72a3d80
Servers that don't know their own IP address should go to the
...
authorities for their first directory fetch, even if their DirPort
is off or if they don't know they're reachable yet. This will help
them bootstrap better. Bugfix on 0.2.0.18-alpha; fixes bug 609.
svn:r13688
2008-02-23 23:39:16 +00:00
Roger Dingledine
cd4b95e402
Make "HashedControlPassword" an alias for "__HashedControlSessionPassword"
...
if it appears on the commandline. should help with bug 586.
svn:r13683
2008-02-22 23:20:28 +00:00
Nick Mathewson
7589765ae9
r14401@tombo: nickm | 2008-02-22 15:33:42 -0500
...
Fix a really stupid parthensis error noticed by mwenge.
svn:r13681
2008-02-22 20:33:47 +00:00
Nick Mathewson
e7db789e82
r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
...
More 64-to-32 fixes. Partial backport candidate. still not done.
svn:r13680
2008-02-22 19:09:45 +00:00
Nick Mathewson
a20eda5669
r14396@tombo: nickm | 2008-02-22 14:07:37 -0500
...
Add --passphrase-fd to tor-gencert.
svn:r13679
2008-02-22 19:07:52 +00:00
Roger Dingledine
5ec5a747d7
Quiet the "Exitrouter '%s' seems to be more restrictive than its exit
...
policy. Not using this router as exit for now." message, since it
legitimately appears every so often and there's no need to alarm users.
svn:r13677
2008-02-22 14:31:40 +00:00
Nick Mathewson
e68760ac0f
r14388@tombo: nickm | 2008-02-21 22:44:28 -0500
...
More 64-to-32 fixes.
svn:r13672
2008-02-22 03:44:36 +00:00
Nick Mathewson
031c212776
r18360@catbus: nickm | 2008-02-21 22:26:32 -0500
...
Make torint.h define ssize_t more robustly; add spaces to last patch
svn:r13670
2008-02-22 03:26:35 +00:00
Nick Mathewson
688b7ddf83
r18358@catbus: nickm | 2008-02-21 22:21:57 -0500
...
Remove extraneous commas in compat.c
svn:r13669
2008-02-22 03:23:20 +00:00
Nick Mathewson
6a1e0c2373
r18356@catbus: nickm | 2008-02-21 21:54:55 -0500
...
Remove redundant check from container.c that gcc 4.2 didnt like
svn:r13668
2008-02-22 02:55:02 +00:00
Nick Mathewson
b21a122ef6
r14379@tombo: nickm | 2008-02-21 17:14:24 -0500
...
Enable v2 handshakes.
svn:r13666
2008-02-21 22:14:32 +00:00
Nick Mathewson
69300eb606
r14374@tombo: nickm | 2008-02-21 16:57:39 -0500
...
Fix all remaining shorten-64-to-32 errors in src/common. Some were genuine problems. Many were compatibility errors with libraries (openssl, zlib) that like predate size_t. Partial backport candidate.
svn:r13665
2008-02-21 21:57:47 +00:00
Nick Mathewson
b375472d14
r14373@tombo: nickm | 2008-02-21 16:29:18 -0500
...
Apply warnings about implicit 64-to-32 conversions; some from Sebastian Hahn; some not.
svn:r13664
2008-02-21 21:57:42 +00:00
Roger Dingledine
1cd90948ab
maybe appease the overflow detectors more
...
svn:r13663
2008-02-21 21:56:04 +00:00
Nick Mathewson
daefbfe691
r14371@tombo: nickm | 2008-02-21 16:13:18 -0500
...
Fix all -Wshorten-64-to-32 warnings that appear on my macbook.
svn:r13662
2008-02-21 21:15:31 +00:00
Nick Mathewson
5c03f82a65
r18345@catbus: nickm | 2008-02-21 13:45:04 -0500
...
Do the last part of arma's fix for bug 437: Track the origin of every addrmap, and use this info so we can remove all the trackhostexits-originated mappings for a given exit.
svn:r13660
2008-02-21 18:45:11 +00:00
Nick Mathewson
0ba2bfeef6
r14363@31-33-219: nickm | 2008-02-21 11:11:33 -0500
...
Answer the next-to-last XXX020rc item.
svn:r13658
2008-02-21 16:12:01 +00:00
Nick Mathewson
e2f25558b9
r14362@31-33-219: nickm | 2008-02-21 11:01:10 -0500
...
Change some of our log messages related to closed TLS connections in order to better reflect reality.
svn:r13657
2008-02-21 16:11:58 +00:00
Nick Mathewson
e18ee2a2ab
r14357@31-33-219: nickm | 2008-02-21 10:39:11 -0500
...
Fix bug-handling code for unhandled write errors, so that it does not try to flush any data on the failed connection. Bugfix on 0.1.2.x.
svn:r13655
2008-02-21 15:39:26 +00:00
Nick Mathewson
41eca067a1
r14356@31-33-219: nickm | 2008-02-21 10:38:26 -0500
...
Defer a couple of XXX020rc items, based on recommendation from arma.
svn:r13654
2008-02-21 15:39:24 +00:00
Nick Mathewson
8b1789c71f
r18336@catbus: nickm | 2008-02-21 09:33:15 -0500
...
Patch from Sebastian Hahn: remove obsolete timeval manipulation functions.
svn:r13653
2008-02-21 14:33:20 +00:00
Roger Dingledine
b3c0d066e5
other cleanups that have been sitting in my sandbox
...
svn:r13649
2008-02-21 09:01:32 +00:00
Roger Dingledine
a60f7caa54
start allowing clients to give up on trackhostexits targets if
...
five circuit attempts fail for a given stream. part of the fix
for bug 437. still an XXX020rc remaining.
svn:r13648
2008-02-21 09:00:54 +00:00
Roger Dingledine
18a209ffe6
Even though the man page said that "TrackHostExits ." should
...
work, nobody had ever implemented it. Bugfix on 0.1.0.x.
svn:r13647
2008-02-21 08:08:13 +00:00
Roger Dingledine
828c707812
Change the behavior of "getinfo status/good-server-descriptor"
...
so it doesn't return failure when any authority disappears.
svn:r13645
2008-02-21 06:06:45 +00:00
Roger Dingledine
b28a342e35
resolve one more, and leave two for nick.
...
svn:r13644
2008-02-21 05:53:50 +00:00
Roger Dingledine
1812a22a60
If we're trying to flush the last bytes on a connection (for
...
example, when answering a directory request), reset the
time-to-give-up timeout every time we manage to write something
on the socket. Bugfix on 0.1.2.x.
svn:r13643
2008-02-21 05:51:09 +00:00
Roger Dingledine
8889229407
and another useful answer
...
svn:r13642
2008-02-21 05:42:12 +00:00
Roger Dingledine
0ddc9d5707
answer one of nick's XXX020rc's usefully
...
svn:r13641
2008-02-21 05:38:19 +00:00
Nick Mathewson
063ced8903
r18296@catbus: nickm | 2008-02-20 23:30:11 -0500
...
Answer one xxx020 item; move 7 other ones to a new "XXX020rc" category: they should get fixed before we cut a release candidate. arma: please review these to see whether you have fixes/answers for any. Please check out the other 14 XXX020s to see if any look critical for the release candidate.
svn:r13640
2008-02-21 04:30:14 +00:00
Nick Mathewson
47e6247673
r18294@catbus: nickm | 2008-02-20 22:42:44 -0500
...
Fix a spelling error and clean up a recent veracode-induced integer overflow check. Both spotted by Chris Palmer.
svn:r13639
2008-02-21 03:42:56 +00:00
Nick Mathewson
1df0647c66
r18291@catbus: nickm | 2008-02-20 22:35:32 -0500
...
Resolve all DOCDOC issues, and document some other undocumented code, and fix a changelog entry.
svn:r13638
2008-02-21 03:38:46 +00:00
Nick Mathewson
7b022eda9c
r18290@catbus: nickm | 2008-02-20 22:34:59 -0500
...
Correct handling of nested MAP_FOREACH loops. There are none of those ATM, but isn't it nice that now they'll be correct?
svn:r13637
2008-02-21 03:38:44 +00:00
Nick Mathewson
ae507a61cc
r18288@catbus: nickm | 2008-02-20 21:18:38 -0500
...
Recover from bad tracked-since value in mtbf history file. This may finally close bug 537.
svn:r13636
2008-02-21 02:18:41 +00:00
Nick Mathewson
0e9dcfab97
r18286@catbus: nickm | 2008-02-20 21:10:33 -0500
...
Fix a bug that kept buf_find_string_offset from finding a string at the very end of the buffer. Add a unit test for this. Also, do not save a pointer to a chunk that might get reallocated by buf_pullup().
svn:r13635
2008-02-21 02:10:38 +00:00
Nick Mathewson
3b58f9929f
r18283@catbus: nickm | 2008-02-20 18:58:31 -0500
...
Fix assertion when searching for a string in an empty chunk.
svn:r13634
2008-02-20 23:58:48 +00:00
Nick Mathewson
304bdfdc6b
r18279@catbus: nickm | 2008-02-20 18:38:48 -0500
...
Log message to try to detect error in buffers.c
svn:r13633
2008-02-20 23:38:57 +00:00
Nick Mathewson
8b8d38162b
r18278@catbus: nickm | 2008-02-20 18:29:07 -0500
...
Unit tests for buf_find_string_offset()
svn:r13632
2008-02-20 23:38:55 +00:00
Nick Mathewson
f0e523c6ef
r18272@catbus: nickm | 2008-02-20 18:20:33 -0500
...
add a flag to suppress overwriting the certificates file with new certificates, so we do not overwrite all certs when starting as an authority.
svn:r13630
2008-02-20 23:20:36 +00:00
Nick Mathewson
93aa335516
r18269@catbus: nickm | 2008-02-20 17:28:24 -0500
...
Apply patch from Sebastian Hahn: stop imposing an arbitrary maximum on the number of file descriptors used for busy servers. Bug reported by Olaf Selke.
svn:r13626
2008-02-20 22:28:26 +00:00
Nick Mathewson
384a8ab777
r18267@catbus: nickm | 2008-02-20 16:57:45 -0500
...
Suppress signed/unsigned comparison warnings in buffers.c
svn:r13624
2008-02-20 21:57:48 +00:00
Nick Mathewson
7521ef9a00
r18264@catbus: nickm | 2008-02-20 12:48:21 -0500
...
fix bufs in buf_pos_t implementation.
svn:r13623
2008-02-20 17:48:39 +00:00
Nick Mathewson
5dd9d16b94
r18263@catbus: nickm | 2008-02-20 12:45:15 -0500
...
Oops. not supposed to use tor_assert() in eventdns.c
svn:r13622
2008-02-20 17:48:37 +00:00
Nick Mathewson
b30c1637bd
One last tweak on debugging code.
...
svn:r13621
2008-02-20 17:30:00 +00:00
Nick Mathewson
dc949b846a
r18259@catbus: nickm | 2008-02-20 12:03:15 -0500
...
Make the last of the veracode warning issues get fixed.
svn:r13620
2008-02-20 17:03:16 +00:00
Nick Mathewson
88efec10a2
r18256@catbus: nickm | 2008-02-20 11:57:31 -0500
...
Simplify rounding logic in bitarray; fix a bug in bitarray_expand().
svn:r13619
2008-02-20 16:57:41 +00:00
Nick Mathewson
cefe0a1959
r18255@catbus: nickm | 2008-02-20 11:44:55 -0500
...
Add asserts and refactor some comparisons in order to fix some veracode-identified issues. Note a bug in buffers.c
svn:r13618
2008-02-20 16:57:39 +00:00
Roger Dingledine
1c8bd320be
pass bucket sizes num_read and num_written around as size_ts
...
rather than ints
svn:r13610
2008-02-20 02:17:41 +00:00
Roger Dingledine
f2ed011813
We were comparing the raw BridgePassword entry with a base64'ed
...
version of it, when handling a "/tor/networkstatus-bridges"
directory request. Now compare correctly. Noticed by Veracode.
svn:r13609
2008-02-20 02:05:28 +00:00
Roger Dingledine
f34d46e7dd
similarly, don't throw around an int for the uint8_t circ->state
...
svn:r13608
2008-02-20 01:01:09 +00:00
Roger Dingledine
7427cf5d56
don't throw around an int for relay_command if we're going to
...
squeeze it into a uint8_t later. also reported by veracode.
svn:r13607
2008-02-20 00:57:37 +00:00
Roger Dingledine
0977c29196
notice an integer overflow if we ever get source files with more
...
than 65k lines in them. also pointed out by veracode.
svn:r13606
2008-02-20 00:46:09 +00:00
Roger Dingledine
e9474ed28e
if you thought r13604 was a kludge, how about this.
...
svn:r13605
2008-02-20 00:30:41 +00:00
Roger Dingledine
56a7c9238e
be more clear about a possible integer underflow problem. this
...
should probably be fixed better somehow.
svn:r13604
2008-02-20 00:11:52 +00:00
Roger Dingledine
e0beb6cc5e
check return value for crypto_pk_asn1_encode here too. thanks veracode.
...
svn:r13603
2008-02-19 23:59:16 +00:00
Nick Mathewson
260c37c14c
r18236@catbus: nickm | 2008-02-19 18:55:21 -0500
...
Explain why I am right and veracode is wrong in routerparse.c line 1141. Using math!
svn:r13602
2008-02-19 23:57:06 +00:00
Roger Dingledine
913f66278c
rearrange our assert so we don't possibly overflow rh.length before
...
triggering the assert. reported by veracode.
svn:r13601
2008-02-19 23:54:17 +00:00
Nick Mathewson
0399538b90
r18233@catbus: nickm | 2008-02-19 18:46:07 -0500
...
Count sockets returned from socketpair() too. This is probably not the socket counting bug.
svn:r13600
2008-02-19 23:46:08 +00:00
Roger Dingledine
707da4f73f
start checking the return value of crypto_pk_asn1_encode() while
...
we're trying to establish an introduction point. bug reported
by veracode.
svn:r13599
2008-02-19 23:33:02 +00:00
Nick Mathewson
42c4670e27
r18230@catbus: nickm | 2008-02-19 18:29:43 -0500
...
Add a few asserts to catch possible errors found by veracode.
svn:r13598
2008-02-19 23:29:45 +00:00
Roger Dingledine
319c0d8933
is_reverse in our struct is uint8_t. don't make it be an int
...
elsewhere. bug reported by veracode.
svn:r13597
2008-02-19 23:14:34 +00:00
Nick Mathewson
dbcf29d301
r18228@catbus: nickm | 2008-02-19 18:05:53 -0500
...
Chris Palmer notes that almost nobody is using smartlist_set_capacity(). Chris Palmer is right. Remove this basically pointless function.
svn:r13596
2008-02-19 23:05:56 +00:00
Nick Mathewson
9479dd3768
r18226@catbus: nickm | 2008-02-19 18:01:01 -0500
...
Brown-paper-bag time. We were failing to count all the sockets from accept().
svn:r13595
2008-02-19 23:01:07 +00:00
Roger Dingledine
d1a195d3cb
call a "number of characters" a size_t, not an int
...
svn:r13594
2008-02-19 22:52:50 +00:00
Nick Mathewson
632c035ad9
r18221@catbus: nickm | 2008-02-19 17:46:16 -0500
...
New debugging code to figure out what is happending with socket counts.
svn:r13593
2008-02-19 22:46:19 +00:00
Roger Dingledine
c126b79f07
be more explicit about a harmless thing that freaked veracode out
...
svn:r13592
2008-02-19 22:32:32 +00:00
Nick Mathewson
4ccffd7aea
r18218@catbus: nickm | 2008-02-19 17:27:40 -0500
...
When SafeLogging is off, have TLS errors and messages logged with their associated addresses.
svn:r13591
2008-02-19 22:27:44 +00:00
Roger Dingledine
810bfe970c
make explicit that we don't care if a rename() call fails.
...
potential bug reported by veracode.
svn:r13590
2008-02-19 22:25:20 +00:00
Nick Mathewson
749735215b
r18208@catbus: nickm | 2008-02-19 17:02:30 -0500
...
Add some checks in torgzip.c to make sure we never overflow size_t there. Also make sure we do not realloc(list,0) in container.c. Backport candidate.
svn:r13587
2008-02-19 22:05:49 +00:00
Roger Dingledine
23e4c849c9
resolve another edge case in staying dormant
...
svn:r13586
2008-02-19 22:01:45 +00:00
Roger Dingledine
da7f0315e6
maybe it should compile too.
...
svn:r13585
2008-02-19 21:41:43 +00:00
Roger Dingledine
d964beac16
If we only ever used Tor for hidden service lookups or posts, we
...
would stop building circuits and start refusing connections after
24 hours, since we false believed that Tor was dormant. Reported
by nwf; bugfix on 0.1.2.x.
svn:r13583
2008-02-19 21:30:24 +00:00
Roger Dingledine
33c754315b
clear up another connlimit lie
...
svn:r13582
2008-02-19 21:08:27 +00:00
Roger Dingledine
d61835a4ba
clean up the socket counting thing. third time's a charm.
...
svn:r13581
2008-02-19 19:48:07 +00:00
Nick Mathewson
f4dc006fb5
r18198@catbus: nickm | 2008-02-19 14:30:30 -0500
...
Try to *fix* the socket counting problem, and add an info log to detect whether we really fixed it
svn:r13580
2008-02-19 19:30:41 +00:00