Commit Graph

8513 Commits

Author SHA1 Message Date
Karsten Loesing 6a32beb877 Apply fix for bug 997.
Hidden service clients didn't use a cached service descriptor that
was older than 15 minutes, but wouldn't fetch a new one either. Now,
use a cached descriptor no matter how old it is and only fetch a new
one when all introduction points fail. Fix for bug 997. Patch from
Marcus Griep.
2009-06-12 11:39:35 +02:00
Karsten Loesing 77f5ad6b07 Restore changes from f79688d that got lost somehow during a merge. 2009-06-12 02:05:21 +02:00
Nick Mathewson 358efe1eea Merge commit 'origin/maint-0.2.1' 2009-06-08 00:01:31 -04:00
Nick Mathewson 20193fc7ab Avoid a memory corruption problem related to "private" in DirPolicy.
This is a posible fix for bug 996.
2009-06-05 19:41:40 -04:00
Nick Mathewson 4945fee65a Merge commit 'origin/maint-0.2.1' 2009-06-04 03:31:12 -04:00
Karsten Loesing 48bf1d97ee Update the rest of the geoip file. 2009-06-04 00:47:58 +02:00
Nick Mathewson 0b23035e43 Update the geoip file 2009-06-03 17:35:41 -04:00
Nick Mathewson b262e76563 Fix gprof bottlenecks on exit nodes found by Jacob.
Apparently all the stuff that does a linear scan over all the DNS
cache entries can get really expensive when your DNS cache is very
large.  It's hard to say how much this will help performance, since
gprof doesn't count time spent in OpenSSL or zlib, but I'd guess 10%.

Also, this patch removes calls to assert_connection_ok() from inside
the read and write callbacks, which are similarly unneeded, and a
little costlier than I'm happy with.

This is probably worth backporting to 0.2.0.
2009-06-03 13:52:03 -04:00
Nick Mathewson 77ffd6b2a7 Merge commit 'origin/maint-0.2.1' 2009-05-31 19:17:22 -04:00
Nick Mathewson c4c7dcd453 Do not report a node as a "chosen exit" when it is not in fact an exit.
Provide a useful warning when launch_circuit tries to make us use a
node we don't want to use.  Just give an info message when this is a
normal and okay situation.  Fix for logging issues in bug 984.
2009-05-31 19:15:36 -04:00
Nick Mathewson e8ac2a8477 Make the second argument to routerset_contains_extendinfo const 2009-05-31 19:15:36 -04:00
Nick Mathewson e84ddead34 Merge branch 'hardware_accel_improvements' 2009-05-31 13:36:50 -04:00
Nick Mathewson 3ca10bb62f Fix-ups for dynamic OpenSSL engine patch.
Include a changelog, and don't try to compare strings with !=.
2009-05-31 13:36:18 -04:00
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
Karsten Loesing dfebc88d56 Warn and exit when we are configured to measure GeoIP statistics, but have no GeoIP database. 2009-05-30 23:35:21 +02: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 3599e9051e Restore changes from Karsten's "Remove unused rendversion parameters".
These were made undone by a merge.
2009-05-28 16:19:05 -04:00
Nick Mathewson 4913a8c4ba Merge commit 'origin/maint-0.2.1' 2009-05-28 16:07:49 -04: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
Nick Mathewson cb18fc2190 Merge commit 'origin/maint-0.2.1' 2009-05-27 18:12:18 -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 0e2618dd54 Merge commit 'origin/maint-0.2.1' 2009-05-27 14:20:18 -04:00
Nick Mathewson 181674e9bb Fix a signed/unsigned comparison warning 2009-05-27 14:19:24 -04:00
Karsten Loesing 54c97c9133 Change the way how directories that are configured with --enable-geoip-stats write geoip stats to disk.
- Write geoip stats to disk every 24 hours, not every hour.
- Remove configuration options and define reasonable defaults.
- Clear history of client requests every 24 hours (which wasn't done at
  all before).
2009-05-27 19:13:31 +02: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
Karsten Loesing bf7e5d6553 Some cleanups on geoip.c.
Use two bitfields for last_seen and action in clientmap_entry_t rather
than having both share a 32-bit. Also, documentation fixes.
2009-05-26 21:32:56 +02:00
Nick Mathewson b805e5debf Merge commit 'origin/maint-0.2.1' into master.
Conflicts:
	ChangeLog
	configure.in
	contrib/tor-mingw.nsi.in
	src/win32/orconfig.h
2009-05-25 16:43:52 -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 2009-05-25 13:23:08 -04:00
Nick Mathewson 3b47be20ec Update newer control_event_stream_bandwidth code to revised control impl 2009-05-25 12:55:59 -04:00
Nick Mathewson b998fed9b9 Remove support for events without the extended format or long names.
Supporting the old formats made our code complex; running without them
has been discouraged since 0.2.1.x.
2009-05-25 12:52:25 -04:00
Roger Dingledine 05e55d82b6 simplify options_act() 2009-05-24 20:31:50 -04:00
Roger Dingledine 9a4b0446b0 fix a comment 2009-05-24 20:31:50 -04:00
Sebastian Hahn f26abf5f54 fix codestyle issues 2009-05-24 02:42:37 +02:00
Martin Peck 7703b887f5 Add support for dynamic OpenSSL hardware crypto acceleration engines. 2009-05-23 16:42:44 -07:00
Jacob Appelbaum 75f963e951 Log the number and size of DNS cache entries on SIGUSR1.
Specifically if you send SIGUSR1, it will add two lines to the log file:
May 22 07:41:59.576 [notice] Our DNS cache has 3364 entries.
May 22 07:41:59.576 [notice] Our DNS cache size is approximately 1022656
bytes.

[tweaked a bit by nickm]
2009-05-22 23:33:44 -04:00
Nick Mathewson 793e97bb2a Add a quick macro to calculate hashtable memory usage 2009-05-22 23:30:52 -04:00
Nick Mathewson a3fadddd4a Improved bug-957 fix for 0.2.2.
Really, our idiocy was that we were calling event_set() on the same
event more than once, which sometimes led to us calling event_set() on
an event that was already inserted, thus making it look uninserted.
With this patch, we just initialize the timeout events when we create
the requests and nameservers, and we don't need to worry about
double-add and double-del cases at all.
2009-05-22 14:06:39 -04:00
Nick Mathewson 4201a3735f Merge commit 'origin/maint-0.2.1' 2009-05-22 11:56:51 -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 79762aac17 Merge commit 'origin/maint-0.2.1' 2009-05-18 16:17:12 -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
Nick Mathewson 14a549552a Merge branch 'maint-0.2.1' into merge_tmp 2009-05-17 02:11:34 -04:00