Commit Graph

10841 Commits

Author SHA1 Message Date
Nick Mathewson fd992deeea Don't attempt to log messages to a controller from a worker thread.
This patch adds a function to determine whether we're in the main
thread, and changes control_event_logmsg() to return immediately if
we're in a subthread.  This is necessary because otherwise we will
call connection_write_to_buf, which modifies non-locked data
structures.

Bugfix on 0.2.0.x; fix for at least one of the things currently
called "bug 977".
2009-05-30 18:16:24 -04:00
Nick Mathewson d66c379765 Clean up a bit of C logic, and fix an erroneous warning.
(Simplify "if (cond) return 1; return 0;" to "return cond;", and don't
give a warning when we start with accounting on but dirport off.)
2009-05-29 23:28:01 -04:00
Sebastian Hahn e70fe116d3 Consider *ListenAddress when warning about low ports and hibernation
Tas (thanks!) noticed that when *ListenAddress is set, Tor would
still warn on startup when *Port is low and hibernation is active.
The patch parses all the *ListenAddress lines, and checks the
ports. Bugfix on 0.2.1.15-rc
2009-05-30 03:09:39 +02:00
Nick Mathewson 873faffb5a Two more spelling fix fixes. 2009-05-28 12:26:17 -04:00
Nick Mathewson 260de44313 Fixes to spelling fixes. Thanks, Roger! 2009-05-28 12:22:48 -04:00
Karsten Loesing d49711e52c Fix unit tests that were broken after last fix of #932.
With the last fix of task 932 (5f03d6c), client requests are only added to
the history when they happen after the start of the current history. This
conflicts with the unit tests that insert current requests first (defining
the start of the client request history) followed by requests in the past.
The fix is to insert requests in chronological order in the unit tests.
2009-05-27 18:04:55 -04:00
Nick Mathewson ec7e054668 Spell-check Tor. 2009-05-27 17:55:51 -04:00
Nick Mathewson f0453c45c8 Spelling fixes in comments and strings 2009-05-27 16:36:13 -04:00
Nick Mathewson 1843f3936c Changelog entry for Karsten's bug-932 patch. 2009-05-27 14:11:38 -04:00
Karsten Loesing 02a417d4e0 Improve documentation for the last fix of bug 932. 2009-05-27 19:10:55 +02:00
Karsten Loesing 5f03d6c547 Fix bug 932 even more.
Ignore connections two hours after switching from bridge to relay or back.
2009-05-27 19:10:54 +02:00
Nick Mathewson 031ce86cd4 Add *.swp to .gitignore as vim's editor dropping. 2009-05-27 12:10:37 -04:00
Nick Mathewson 99c315a473 Use tor_socket_strerror in eventdns.c. Fixes bug 987. 2009-05-25 16:38:50 -04:00
Nick Mathewson f334297d38 Bump version to 0.2.1.15-rc-dev. 2009-05-25 16:32:47 -04:00
Roger Dingledine 2f39eca28b bump to 0.2.1.15-rc tor-0.2.1.15-rc 2009-05-25 13:23:08 -04:00
Roger Dingledine a2c841d555 add the 0.2.1.14-rc blurb 2009-05-25 13:16:45 -04:00
Roger Dingledine 7d9567af2e clean up the 0.2.1.15-rc changelog 2009-05-25 13:14:58 -04:00
Nick Mathewson 1d002a25a2 Finish up the 0.2.1 version of the bug 957 fix.
Basically, all this means is downgrading our warning messages to debug
messages, since the bug workaround code here is adequate to stop the
bug.
2009-05-22 11:47:09 -04:00
phobos 678092750b fix a spelling mistake in config.c for "contries" 2009-05-22 01:26:17 -04:00
Nick Mathewson 34030a3d23 Possible fix for crash bug related to event timeouts. [Bug 957]
If we ever add an event, then set it, then add it again, there will be
now two pointers to the event in the event base.  If we delete one and
free it, the first pointer will still be there, and possibly cause a
crash later.

This patch adds detection for this case to the code paths in
eventdns.c, and works around it.  If the warning message ever
displays, then a cleverer fix is in order.

{I am not too confident that this *is* the fix, since bug 957 is very
tricky.  If it is, it is a bugfix on 0.2.0.}
2009-05-18 16:12:39 -04:00
Roger Dingledine 2fa5410218 Fix a memory leak when v3 directory authorities load their keys
and cert from disk. Bugfix on 0.2.0.1-alpha.
2009-05-17 02:04:59 -04:00
Nick Mathewson c0515b307c Fix valgrind error when marking a descriptor as never-downloadable.
When we got a descriptor that we (as an authority) rejected as totally
bad, we were freeing it, then using the digest in its RAM to look up its
download status.  Caught by arma with valgrind.  Bugfix on 0.2.1.9-alpha.
2009-05-17 02:01:09 -04:00
Nick Mathewson 11b9c839f0 Stop using malloc_usable_size(): valgrind hates it. 2009-05-17 01:55:02 -04:00
Roger Dingledine c28d25e7a4 minor tweak on changelog entries 2009-05-17 01:22:28 -04:00
Nick Mathewson 9f25a5529a Fix an assertion-failure in memarea_alloc() on 64-bit platforms.
The trick is that we should assert that our next_mem pointer has not
run off the end of the array _before_ we realign the pointer, since
doing that could take us over the end... but only if we're on a system
where malloc() gives us ram in increments smaller than sizeof(void*).
2009-05-17 00:02:59 -04:00
Mike Perry 29bf271ba2 Fix misreporting of stream bandwidths. 2009-05-14 17:52:26 -04:00
Nick Mathewson 45171cd9e9 Changelog entries for bug932 fixes 2009-05-13 16:46:21 -04:00
Nick Mathewson a38ed1a235 Use | with flags, not +. 2009-05-13 16:45:59 -04:00
Karsten Loesing 9e97067b2f Prevent bridges from publishing router descriptors.
Bridges are not supposed to publish router descriptors to the directory
authorities. It defeats the point of bridges when they are included in the
public relay directory.

This patch puts out a warning and exits when the node is configured as
a bridge and to publish v1, v2, or v3 descriptors at the same time.

Also fixes part of bug 932.
2009-05-13 16:45:59 -04:00
Nick Mathewson fc091e8a96 When our bridge status changes, forget old geoip data.
This fixes bug 932, where all of our usage totals for users when we
were a regular server would get included in the extrainfo document.
2009-05-13 16:45:59 -04:00
Nick Mathewson c36efb0c45 Use a mutex to protect the count of open sockets.
This matters because a cpuworker can close its socket when it
finishes.  Cpuworker typically runs in another thread, so without a
lock here, we can have a race condition and get confused about how
many sockets are open.  Possible fix for bug 939.
2009-05-13 09:38:48 -04:00
Sebastian Hahn a28215a150 Warn when hibernation and low-port on non-windows is configured
This addresses the first part of bug 918. Users are now warned when
they try to use hibernation in combination with a port below 1024
when they're not on Windows. We don't want to die here, because
people might run Tor as root, use a capabilities system or some
other platform that will allow them to re-attach low ports.

Wording suggested by Marian
2009-05-12 20:00:00 +02:00
Nick Mathewson 88d81ead83 Better debugging output for bug 977 case.
(Don't crash immediately if we have leftover chunks to free after
freeing chunks in a buffer freelist; instead log a debugging message
that might help.)
2009-05-12 13:54:21 -04:00
Karsten Loesing 9b32e8c141 Update copyright to 2009. 2009-05-04 11:28:27 -04:00
Nick Mathewson 6cf933f107 Bump 0.2.1 branch version to 0.2.1.14-rc-dev 2009-04-29 14:16:15 -04:00
Nick Mathewson 029b8eb056 Add foo.o and foo~ files to gitignore. 2009-04-29 14:00:14 -04:00
Nick Mathewson 7d8a81ec06 Add an initial .gitignore to master 2009-04-29 09:19:18 -04:00
Roger Dingledine f04dec4908 fix typo and naming convention
svn:r19377
2009-04-26 03:59:35 +00:00
Nick Mathewson e4d3352e3f Initial thoughts on a TODO.022.
svn:r19369
2009-04-24 05:45:37 +00:00
Sebastian Hahn 5675be39a0 Return -1 in the error case from read_bandwidth_usage.
svn:r19367
2009-04-23 22:04:10 +00:00
Jacob Appelbaum f33f2e9591 Update the port knocking SPA document to have more details. Still needs a packet filter.
svn:r19356
2009-04-21 07:55:07 +00:00
Jacob Appelbaum 7f4bfe5107 A small set of ideas that Nick and Roger suggested I write up regarding bridge detection.
svn:r19355
2009-04-21 04:06:49 +00:00
Peter Palfrader 657f6bba03 New upstream version
svn:r19340
2009-04-16 18:39:03 +00:00
Karsten Loesing 4e6120cffb Documentation fix.
svn:r19337
2009-04-16 08:25:36 +00:00
Roger Dingledine 72e4d48c7a Update to the "April 3 2009" ip-to-country file.
svn:r19307
tor-0.2.1.14-rc
2009-04-12 08:09:38 +00:00
Roger Dingledine a31d9cec82 bump to 0.2.1.14-rc
svn:r19306
2009-04-12 08:02:14 +00:00
Roger Dingledine 39ceda7e05 Raise the minimum bandwidth to be a relay from 20000 bytes to 20480
bytes (aka 20KB/s), to match our documentation. Also update
directory authorities so they always assign the Fast flag to relays
with 20KB/s of capacity. Now people running relays won't suddenly
find themselves not seeing any use, if the network gets faster
on average.


svn:r19305
2009-04-12 07:56:58 +00:00
Roger Dingledine 115474a44e put HashedControlPassword and CookieAuthentication explicitly in the
torrc.sample.in, so unix people don't shoot themselves in the foot.


svn:r19304
2009-04-12 06:45:46 +00:00
Roger Dingledine c024928b63 For belt-and-suspenders, relays that don't set Address in their config
now avoid using begin_dir for all direct connections.


svn:r19296
2009-04-11 19:40:42 +00:00
Roger Dingledine 419d158c74 make it compile too
svn:r19295
2009-04-11 19:22:38 +00:00