]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
13 years agobump to 0.2.3.18-rc tor-0.2.3.18-rc
Roger Dingledine [Thu, 28 Jun 2012 19:34:33 +0000 (15:34 -0400)] 
bump to 0.2.3.18-rc

13 years agoadd a blurb for 0.2.3.18-rc, other minor cleanups
Roger Dingledine [Thu, 28 Jun 2012 19:32:36 +0000 (15:32 -0400)] 
add a blurb for 0.2.3.18-rc, other minor cleanups

13 years agofix grammar in comment
Roger Dingledine [Thu, 28 Jun 2012 17:43:01 +0000 (13:43 -0400)] 
fix grammar in comment

13 years agofold in more changes entries
Roger Dingledine [Thu, 28 Jun 2012 17:42:30 +0000 (13:42 -0400)] 
fold in more changes entries

13 years agoClean up check-spaces block; make it cover the right files
Nick Mathewson [Thu, 28 Jun 2012 15:04:52 +0000 (11:04 -0400)] 
Clean up check-spaces block; make it cover the right files

13 years agoMerge remote-tracking branch 'public/bug6244_part2' into maint-0.2.3
Nick Mathewson [Thu, 28 Jun 2012 14:49:32 +0000 (10:49 -0400)] 
Merge remote-tracking branch 'public/bug6244_part2' into maint-0.2.3

13 years agoAdd version and bug number to 5238 changes file
Nick Mathewson [Thu, 28 Jun 2012 14:45:56 +0000 (10:45 -0400)] 
Add version and bug number to 5238 changes file

13 years agoDowngrade 'Got a certificate, but we already have it' log message from warning to...
Andrea Shepard [Thu, 28 Jun 2012 07:21:06 +0000 (00:21 -0700)] 
Downgrade 'Got a certificate, but we already have it' log message from warning to info, except when we're a dirauth (fixes bug 5238)

13 years agoFix GETINFO address-mappings/... with wildcarded addresses.
Nick Mathewson [Thu, 28 Jun 2012 03:55:01 +0000 (23:55 -0400)] 
Fix GETINFO address-mappings/... with wildcarded addresses.

13 years agoAllow wildcarded mapaddress targets in controller MAPADDRESS command
Nick Mathewson [Thu, 28 Jun 2012 03:38:04 +0000 (23:38 -0400)] 
Allow wildcarded mapaddress targets in controller MAPADDRESS command

13 years agomerge changes files into upcoming changelog
Roger Dingledine [Thu, 28 Jun 2012 01:32:17 +0000 (21:32 -0400)] 
merge changes files into upcoming changelog

13 years agoMerge remote-tracking branch 'public/bug6227' into maint-0.2.3
Nick Mathewson [Tue, 26 Jun 2012 15:03:56 +0000 (11:03 -0400)] 
Merge remote-tracking branch 'public/bug6227' into maint-0.2.3

13 years agoFix a warning when using glibc's strcspn with clang.
Nick Mathewson [Tue, 26 Jun 2012 14:55:23 +0000 (10:55 -0400)] 
Fix a warning when using glibc's strcspn with clang.

With glibc 2.15 and clang 3.0, I get warnings from where we use the
strcpsn implementation in the header as strcspn(string, "=").  This
is apparently because clang sees that part of the strcspn macro
expands to "="[2], and doesn't realize that that part of the macro
is only evaluated when "="[1] != 0.

13 years agoAdd a unit test for environment_variable_names_equal
Nick Mathewson [Tue, 26 Jun 2012 14:50:37 +0000 (10:50 -0400)] 
Add a unit test for environment_variable_names_equal

I need this because I'm about to frob that function to stop using
strcspn() in order to get rid of a clang warning.

13 years agoFix a compilation warning with clang 3.0
Nick Mathewson [Tue, 26 Jun 2012 14:48:31 +0000 (10:48 -0400)] 
Fix a compilation warning with clang 3.0

In b1ad1a1d0266a20bb we introduced an implicit (but safe)
long-to-int shortening that clang didn't like.

Warning not in any released version of Tor.

13 years agoDowngrade message about md cache cleaning from notice to info
Nick Mathewson [Tue, 26 Jun 2012 14:30:11 +0000 (10:30 -0400)] 
Downgrade message about md cache cleaning from notice to info

Fix for #6238

13 years agoBump the test util/threads timeout up to 150 sec
Nick Mathewson [Mon, 25 Jun 2012 17:44:34 +0000 (13:44 -0400)] 
Bump the test util/threads timeout up to 150 sec

This should make some debian build systems happier.

Also, increase the select() timeout to a more reasonable 100 msec.

13 years agoDon't do DNS lookups when parsing corrupted managed proxy messages.
George Kadianakis [Mon, 25 Jun 2012 15:30:15 +0000 (18:30 +0300)] 
Don't do DNS lookups when parsing corrupted managed proxy messages.

The functions parse_{s,c}method_line() were using
tor_addr_port_lookup() which is capable of doing DNS lookups. DNS
lookups should not be necessary when parsing {C,S}METHOD lines.

13 years agoMerge remote-tracking branch 'public/bug6225' into maint-0.2.3
Nick Mathewson [Mon, 25 Jun 2012 15:51:19 +0000 (11:51 -0400)] 
Merge remote-tracking branch 'public/bug6225' into maint-0.2.3

13 years agoCatch a few more K&R violations with make check-spaces
Nick Mathewson [Sat, 23 Jun 2012 19:51:48 +0000 (15:51 -0400)] 
Catch a few more K&R violations with make check-spaces

We now catch bare {s that should be on the previous line with a do,
while, if, or for, and elses that should share a line with their
preceding }.

That is,
    if (foo)
    {
and
    if (foo) {
      ...
    }
    else

are now detected.

We should think about maybe making Tor uncrustify-clean some day,
but configuring uncrustify is an exercise in bizarreness, and
reformatting huge gobs of Tor is always painful.

13 years agofix broken utf8-ism
Roger Dingledine [Sat, 23 Jun 2012 19:42:18 +0000 (15:42 -0400)] 
fix broken utf8-ism

13 years agoDon't assert in get_string_from_pipe() on len==0
Nick Mathewson [Sat, 23 Jun 2012 19:35:43 +0000 (15:35 -0400)] 
Don't assert in get_string_from_pipe() on len==0

We can treat this case as an EAGAIN (probably because of an
unexpected internal NUL) rather than a crash-worthy problem.

Fixes bug 6225, again.  Bug not in any released version of Tor.

13 years agoResolve crash caused by format_helper_exit_status changes in #5557
Nick Mathewson [Sat, 23 Jun 2012 19:30:01 +0000 (15:30 -0400)] 
Resolve crash caused by format_helper_exit_status changes in #5557

Because the string output was no longer equal in length to
HEX_ERRNO_SIZE, the write() call would add some extra spaces and
maybe a NUL, and the NUL would trigger an assert in
get_string_from_pipe.

Fixes bug 6225; bug not in any released version of Tor.

13 years agoMerge branch 'bug5099_nm' into maint-0.2.3
Nick Mathewson [Sat, 23 Jun 2012 19:10:57 +0000 (15:10 -0400)] 
Merge branch 'bug5099_nm' into maint-0.2.3

13 years agoTweak bug5099 changes file
Nick Mathewson [Sat, 23 Jun 2012 19:10:43 +0000 (15:10 -0400)] 
Tweak bug5099 changes file

13 years agoImprove log message issued when a managed proxy fails to launch.
George Kadianakis [Sat, 23 Jun 2012 14:36:16 +0000 (17:36 +0300)] 
Improve log message issued when a managed proxy fails to launch.

13 years agoMerge remote-tracking branch 'public/bug6211' into maint-0.2.3
Nick Mathewson [Sat, 23 Jun 2012 02:38:59 +0000 (22:38 -0400)] 
Merge remote-tracking branch 'public/bug6211' into maint-0.2.3

13 years agoMerge remote-tracking branch 'public/bug6203_v2' into maint-0.2.3
Nick Mathewson [Sat, 23 Jun 2012 02:33:14 +0000 (22:33 -0400)] 
Merge remote-tracking branch 'public/bug6203_v2' into maint-0.2.3

13 years agoStyle tweaks and add a warning about NUL-termination
Nick Mathewson [Sat, 23 Jun 2012 02:17:24 +0000 (22:17 -0400)] 
Style tweaks and add a warning about NUL-termination

13 years agoAdd unit test for format_hex_number_for_helper_exit_status()
Andrea Shepard [Thu, 21 Jun 2012 01:38:07 +0000 (18:38 -0700)] 
Add unit test for format_hex_number_for_helper_exit_status()

13 years agoRefactor unsigned int hex formatting out of format_helper_exit_status() in util.c
Andrea Shepard [Wed, 20 Jun 2012 21:43:50 +0000 (14:43 -0700)] 
Refactor unsigned int hex formatting out of format_helper_exit_status() in util.c

13 years agoMake format_helper_exit_status() avoid unnecessary spaces
Andrea Shepard [Tue, 19 Jun 2012 11:07:30 +0000 (04:07 -0700)] 
Make format_helper_exit_status() avoid unnecessary spaces

13 years agoFix a regression bug in AllowDotExit
Nick Mathewson [Tue, 19 Jun 2012 23:45:28 +0000 (19:45 -0400)] 
Fix a regression bug in AllowDotExit

The code that detected the source of a remapped address checked that
an address mapping's source was a given rewrite rule if addr_orig had
no .exit, and addr did have a .exit after processing that rule.  But
addr_orig was formatted for logging: it was not the original address
at all, but rather was the address escaped for logging and possibly
replaced with "[scrubbed]".

This new logic will correctly set ADDRMAPSRC_NONE in the case when the
address starts life as a .exit address, so that AllowDotExit can work
again.

Fixes bug 6211; bugfix on 0.2.3.17-beta

13 years agoDisable warning for marked-but-reading in main.c
Nick Mathewson [Tue, 19 Jun 2012 15:48:03 +0000 (11:48 -0400)] 
Disable warning for marked-but-reading in main.c

It turns out this can happen.  Even though there is no reason for
connections to be marked but reading, we leave them reading anyway,
so warning here is unwarranted.  Let's turn that back on once we do
something sensible and disable reading when we mark.  Bugfix for
6203 on Tor 0.2.3.17-beta.

Thanks to cypherpunks for pointing out the general stupidity of the
original code here.

13 years agoMerge remote-tracking branch 'public/bug3311'
Nick Mathewson [Mon, 18 Jun 2012 16:07:39 +0000 (12:07 -0400)] 
Merge remote-tracking branch 'public/bug3311'

13 years agoMerge branch 'bug4748_squashed'
Nick Mathewson [Mon, 18 Jun 2012 16:01:56 +0000 (12:01 -0400)] 
Merge branch 'bug4748_squashed'

13 years agoDocument 0.2.3.x torrc/default-torrc/command line semantics changes
Nick Mathewson [Fri, 15 Jun 2012 20:41:30 +0000 (16:41 -0400)] 
Document 0.2.3.x torrc/default-torrc/command line semantics changes

Bug 4748

squash! Document 0.2.3.x torrc/default-torrc/command line semantics changes

Incorporates fixes suggested by rransom.

13 years agoMerge branch 'bug6173_rebased'
Nick Mathewson [Mon, 18 Jun 2012 15:52:03 +0000 (11:52 -0400)] 
Merge branch 'bug6173_rebased'

13 years agoMerge remote-tracking branch 'andrea/bug6028'
Nick Mathewson [Mon, 18 Jun 2012 15:51:55 +0000 (11:51 -0400)] 
Merge remote-tracking branch 'andrea/bug6028'

13 years agooops: AC_RUN_IFELSE gets offended if I don't give it a AC_LANG_PROGRAM
Nick Mathewson [Mon, 18 Jun 2012 15:47:05 +0000 (11:47 -0400)] 
oops: AC_RUN_IFELSE gets offended if I don't give it a AC_LANG_PROGRAM

13 years agoMore sophisticated attempt at detecting working linker options
Nick Mathewson [Sat, 16 Jun 2012 01:04:07 +0000 (21:04 -0400)] 
More sophisticated attempt at detecting working linker options

On some platforms, the linker is perfectly happy to produce binaries
that won't run if you give it the wrong set of flags.  So when not
cross-compiling, try to link-and-run a little test program, rather
than just linking it.

Possible fix for 6173.

13 years agoconn_type_to_string() on a listener already says it's a listener
Roger Dingledine [Sat, 16 Jun 2012 06:29:03 +0000 (02:29 -0400)] 
conn_type_to_string() on a listener already says it's a listener

13 years agofix the typo on the typo fix
Roger Dingledine [Sat, 16 Jun 2012 00:34:16 +0000 (20:34 -0400)] 
fix the typo on the typo fix

13 years agoAlways set *socket_error to something appropriate when returning -1 from connection_c...
Andrea Shepard [Fri, 15 Jun 2012 23:53:32 +0000 (16:53 -0700)] 
Always set *socket_error to something appropriate when returning -1 from connection_connect()

13 years agofix typos from 783f705d
Roger Dingledine [Fri, 15 Jun 2012 21:08:25 +0000 (17:08 -0400)] 
fix typos from 783f705d

13 years agofix a compiler warning added in one of my XXX023 fixes.
Nick Mathewson [Fri, 15 Jun 2012 20:43:59 +0000 (16:43 -0400)] 
fix a compiler warning added in one of my XXX023 fixes.

13 years agoWhitespace fix
Nick Mathewson [Fri, 15 Jun 2012 20:12:24 +0000 (16:12 -0400)] 
Whitespace fix

13 years agoFix a typo found by Mike.
Nick Mathewson [Fri, 15 Jun 2012 20:12:04 +0000 (16:12 -0400)] 
Fix a typo found by Mike.

13 years agoMerge remote-tracking branch 'public/xxx023'
Nick Mathewson [Fri, 15 Jun 2012 20:10:59 +0000 (16:10 -0400)] 
Merge remote-tracking branch 'public/xxx023'

13 years agoClarify some messages about publishing hidden service descriptors
Nick Mathewson [Fri, 15 Jun 2012 19:25:46 +0000 (15:25 -0400)] 
Clarify some messages about publishing hidden service descriptors

Fix for bug 3311.

13 years agoCheck the correct consensus before giving it to the client
Nick Mathewson [Fri, 15 Jun 2012 14:50:41 +0000 (10:50 -0400)] 
Check the correct consensus before giving it to the client

Previously, a directory would check the latest NS consensus for
having the signatures the client wanted, and use that consensus's
valid_until time to set the HTTP lifetime.  With this patch, the
directory looks at NS consensus or the microdesc consensus,
depending on what the client asked for.

13 years agoChange a silent ignore-the-bug in microdesc.c to a LOG_INFO
Nick Mathewson [Fri, 15 Jun 2012 14:40:37 +0000 (10:40 -0400)] 
Change a silent ignore-the-bug in microdesc.c to a LOG_INFO

I don't believe this bug occurs, but there was an XXX023 to make
sure it doesn't.

13 years agoMove tor_gettimeofday_cached() into compat_libevent
Nick Mathewson [Fri, 15 Jun 2012 14:31:34 +0000 (10:31 -0400)] 
Move tor_gettimeofday_cached() into compat_libevent

13 years agoRefactor GETINFO process/descriptor-limit
Nick Mathewson [Fri, 15 Jun 2012 14:16:00 +0000 (10:16 -0400)] 
Refactor GETINFO process/descriptor-limit

Previously it duplicated some getrlimit code and content from compat.c;
now it doesn't.

13 years agoDocument that we are unlikely to underflow session group IDs.
Nick Mathewson [Fri, 15 Jun 2012 14:05:21 +0000 (10:05 -0400)] 
Document that we are unlikely to underflow session group IDs.

13 years agoTriage the XXX023 and XXX022 comments: postpone many.
Nick Mathewson [Fri, 15 Jun 2012 13:37:40 +0000 (09:37 -0400)] 
Triage the XXX023 and XXX022 comments: postpone many.

13 years agoMerge remote-tracking branch 'public/bug5932'
Nick Mathewson [Fri, 15 Jun 2012 18:44:32 +0000 (14:44 -0400)] 
Merge remote-tracking branch 'public/bug5932'

13 years agoDowngrade log messages about cbt enabled/disabled. Bug 6169.
Nick Mathewson [Fri, 15 Jun 2012 13:57:18 +0000 (09:57 -0400)] 
Downgrade log messages about cbt enabled/disabled. Bug 6169.

13 years agowhitespace fix
Roger Dingledine [Fri, 15 Jun 2012 08:41:57 +0000 (04:41 -0400)] 
whitespace fix

13 years agobump to 0.2.3.17-beta-dev
Roger Dingledine [Fri, 15 Jun 2012 08:29:32 +0000 (04:29 -0400)] 
bump to 0.2.3.17-beta-dev

13 years agogive 0.2.3.17-beta a release blurb tor-0.2.3.17-beta
Roger Dingledine [Fri, 15 Jun 2012 08:16:40 +0000 (04:16 -0400)] 
give 0.2.3.17-beta a release blurb

13 years agoanother little step at making debugging 5458 easier
Roger Dingledine [Fri, 15 Jun 2012 07:58:47 +0000 (03:58 -0400)] 
another little step at making debugging 5458 easier

13 years agotab-man returneth (this time using the name 'rob')
Roger Dingledine [Fri, 15 Jun 2012 07:28:18 +0000 (03:28 -0400)] 
tab-man returneth (this time using the name 'rob')

13 years agofix typos, logic error, default in man page
Roger Dingledine [Fri, 15 Jun 2012 07:25:27 +0000 (03:25 -0400)] 
fix typos, logic error, default in man page

13 years agobump to 0.2.3.17-beta
Roger Dingledine [Fri, 15 Jun 2012 07:13:00 +0000 (03:13 -0400)] 
bump to 0.2.3.17-beta

13 years agofold in next changes items
Roger Dingledine [Fri, 15 Jun 2012 07:10:07 +0000 (03:10 -0400)] 
fold in next changes items

13 years agoExpand on bug5458 changes file
Nick Mathewson [Fri, 15 Jun 2012 04:45:48 +0000 (00:45 -0400)] 
Expand on bug5458 changes file

13 years agoAdd a changes file for bug5458.
Mike Perry [Fri, 15 Jun 2012 04:31:36 +0000 (21:31 -0700)] 
Add a changes file for bug5458.

13 years agoLower the default path bias notice rate to 40%.
Mike Perry [Fri, 15 Jun 2012 04:15:08 +0000 (21:15 -0700)] 
Lower the default path bias notice rate to 40%.

I saw 72% on a test run with 26 circuits. 70% might be a little close to the
line. That, or min_circs is too low and we need to be more patient. We still
need to test/simulate more.

13 years agoFor now, never disable any guards.
Mike Perry [Wed, 13 Jun 2012 23:37:43 +0000 (16:37 -0700)] 
For now, never disable any guards.

13 years agoDefend against entry node path bias attacks
Mike Perry [Fri, 4 May 2012 03:15:34 +0000 (20:15 -0700)] 
Defend against entry node path bias attacks

The defense counts the circuit failure rate for each guard for the past N
circuits. Failure is defined as the ability to complete a first hop, but not
finish completing the circuit all the way to the exit.

If the failure rate exceeds a certain amount, a notice is emitted.

If it exceeds a greater amount, a warn is emitted and the guard is disabled.

These values are governed by consensus parameters which we intend to tune as
we perform experiments and statistical simulations.

13 years agoDocument --hush; fix documentation for --quiet.
Nick Mathewson [Thu, 14 Jun 2012 18:58:51 +0000 (14:58 -0400)] 
Document --hush; fix documentation for --quiet.

13 years agoMerge remote-tracking branch 'asn-mytor/bug5589_take2'
Nick Mathewson [Thu, 14 Jun 2012 17:05:16 +0000 (13:05 -0400)] 
Merge remote-tracking branch 'asn-mytor/bug5589_take2'

13 years agoRemove validate_pluggable_transports_config(): redundant since 9d9b5ed0.
George Kadianakis [Thu, 14 Jun 2012 15:01:22 +0000 (18:01 +0300)] 
Remove validate_pluggable_transports_config(): redundant since 9d9b5ed0.

The warning message of validate_pluggable_transports_config() is
superseded by the changes in the warning message of
connection_or_connect() when the proxy credentials can't be found.

13 years agodemote two entries that don't affect most users
Roger Dingledine [Thu, 14 Jun 2012 09:50:32 +0000 (05:50 -0400)] 
demote two entries that don't affect most users

13 years agofold in further changes files
Roger Dingledine [Thu, 14 Jun 2012 09:47:55 +0000 (05:47 -0400)] 
fold in further changes files

13 years agoMerge remote-tracking branch 'public/bug4663'
Nick Mathewson [Wed, 13 Jun 2012 21:01:53 +0000 (17:01 -0400)] 
Merge remote-tracking branch 'public/bug4663'

13 years agoMerge branch 'trac-5049-squashed'
Nick Mathewson [Wed, 13 Jun 2012 20:55:39 +0000 (16:55 -0400)] 
Merge branch 'trac-5049-squashed'

13 years agoOne more fix for bug 5049.
Nick Mathewson [Wed, 13 Jun 2012 20:42:51 +0000 (16:42 -0400)] 
One more fix for bug 5049.

13 years agoSatisfy make check-spaces
Andrea Shepard [Wed, 13 Jun 2012 02:38:28 +0000 (19:38 -0700)] 
Satisfy make check-spaces

13 years agoMove cbt->liveness.timeouts_after_firsthop free code into its own function
Andrea Shepard [Wed, 13 Jun 2012 02:27:37 +0000 (19:27 -0700)] 
Move cbt->liveness.timeouts_after_firsthop free code into its own function

13 years agoAdd change file for bug 5049
Andrea Shepard [Tue, 12 Jun 2012 19:49:03 +0000 (12:49 -0700)] 
Add change file for bug 5049

13 years agoEarly exit from circuit_build_times_set_timeout() if adaptive timeouts are disabled
Andrea Shepard [Tue, 12 Jun 2012 19:24:05 +0000 (12:24 -0700)] 
Early exit from circuit_build_times_set_timeout() if adaptive timeouts are disabled

13 years agoDon't poll to see if we need to build circuits for timeout data if LearnCircuitBuildT...
Andrea Shepard [Tue, 12 Jun 2012 19:12:06 +0000 (12:12 -0700)] 
Don't poll to see if we need to build circuits for timeout data if LearnCircuitBuildTimeout is disabled

13 years agoUse K&R style
Andrea Shepard [Wed, 13 Jun 2012 02:31:01 +0000 (19:31 -0700)] 
Use K&R style

13 years agoUnconditionally use config CircuitBuildTimeout if LearnCircuitBuildTimeout is disabled
Andrea Shepard [Tue, 12 Jun 2012 19:11:32 +0000 (12:11 -0700)] 
Unconditionally use config CircuitBuildTimeout if LearnCircuitBuildTimeout is disabled

13 years agoDon't track circuit timeout history unless we're actually using adaptive timeouts
Andrea Shepard [Tue, 12 Jun 2012 18:52:38 +0000 (11:52 -0700)] 
Don't track circuit timeout history unless we're actually using adaptive timeouts

13 years agoAdd debug logging to circuit_build_times_* of circuitbuild.c to trace queries of...
Andrea Shepard [Tue, 12 Jun 2012 03:36:38 +0000 (20:36 -0700)] 
Add debug logging to circuit_build_times_* of circuitbuild.c to trace queries of consensus parameters for bug 5049

13 years agoOnly use -Qunused-arguments when building with clang. fix on 5210 fix.
Nick Mathewson [Wed, 13 Jun 2012 20:37:23 +0000 (16:37 -0400)] 
Only use -Qunused-arguments when building with clang. fix on 5210 fix.

13 years agoMerge branch 'bug5263_023'
Nick Mathewson [Wed, 13 Jun 2012 20:23:16 +0000 (16:23 -0400)] 
Merge branch 'bug5263_023'

13 years agoAdd changes file for bug5263
Nick Mathewson [Tue, 5 Jun 2012 16:11:08 +0000 (12:11 -0400)] 
Add changes file for bug5263

13 years agoAdd rate-limited log message to bug5263 fix
Nick Mathewson [Tue, 15 May 2012 14:22:17 +0000 (10:22 -0400)] 
Add rate-limited log message to bug5263 fix

Initially I said, "I claim that we shouldn't be reading and marked;
let's see if I'm right."  But Rob finds that it does.

13 years agoFix busy Libevent loops (infinite loops in Shadow)
Rob G. Jansen [Tue, 28 Feb 2012 23:19:49 +0000 (18:19 -0500)] 
Fix busy Libevent loops (infinite loops in Shadow)

There is a bug causing busy loops in Libevent and infinite loops in
the Shadow simulator. A connection that is marked for close, wants
to flush, is held open to flush, but is rate limited (the token
bucket is empty) triggers the bug.

This commit fixes the bug. Details are below.

This currently happens on read and write callbacks when the active
socket is marked for close. In this case, Tor doesn't actually try
to complete the read or write (it returns from those methods when
marked), but instead tries to clear the connection with
conn_close_if_marked(). Tor will not close a marked connection that
contains data: it must be flushed first. The bug occurs when this
flush operation on the marked connection can not occur because the
connection is rate-limited (its write token bucket is empty).

The fix is to detect when rate limiting is preventing a marked
connection from properly flushing. In this case, it should be
flagged as read/write_blocked_on_bandwidth and the read/write events
de-registered from Libevent. When the token bucket gets refilled, it
will check the associated read/write_blocked_on_bandwidth flag, and
add the read/write event back to Libevent, which will cause it to
fire. This time, it will be properly flushed and closed.

The reason that both read and write events are both de-registered
when the marked connection can not flush is because both result in
the same behavior. Both read/write events on marked connections will
never again do any actual reads/writes, and are only useful to
trigger the flush and close the connection. By setting the
associated read/write_blocked_on_bandwidth flag, we ensure that the
event will get added back to Libevent, properly flushed, and closed.

Why is this important? Every Shadow event occurs at a discrete time
instant. If Tor does not properly deregister Libevent events that
fire but result in Tor essentially doing nothing, Libevent will
repeatedly fire the event. In Shadow this means infinite loop,
outside of Shadow this means wasted CPU cycles.

13 years agoChange smartlist_create->smartlist_new in bug4744 branch as merged to master
Nick Mathewson [Wed, 13 Jun 2012 16:16:02 +0000 (12:16 -0400)] 
Change smartlist_create->smartlist_new in bug4744 branch as merged to master

13 years agoMerge branch 'bug4744_squashed'
Nick Mathewson [Wed, 13 Jun 2012 16:09:13 +0000 (12:09 -0400)] 
Merge branch 'bug4744_squashed'

13 years agoImplement the client side of proposal 198
Nick Mathewson [Tue, 15 May 2012 19:32:18 +0000 (15:32 -0400)] 
Implement the client side of proposal 198

This is a feature removal: we no longer fake any ciphersuite other
than the not-really-standard SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA
(0xfeff).  This change will let servers rely on our actually
supporting what we claim to support, and thereby let Tor migrate to
better TLS ciphersuites.

As a drawback, Tor instances that use old openssl versions and
openssl builds with ciphers disabled will no longer give the
"firefox" cipher list.

13 years agoMerge remote-tracking branch 'public/bug3940_redux'
Nick Mathewson [Wed, 13 Jun 2012 15:40:38 +0000 (11:40 -0400)] 
Merge remote-tracking branch 'public/bug3940_redux'

13 years agoMerge remote-tracking branch 'public/bug5210'
Nick Mathewson [Wed, 13 Jun 2012 15:37:11 +0000 (11:37 -0400)] 
Merge remote-tracking branch 'public/bug5210'

13 years agoFix another clang compile warning
Sebastian Hahn [Wed, 13 Jun 2012 14:51:56 +0000 (16:51 +0200)] 
Fix another clang compile warning

We forgot this when we fixed 5969.

13 years agoMerge branch 'task-5849-3-squashed'
Nick Mathewson [Wed, 13 Jun 2012 14:13:01 +0000 (10:13 -0400)] 
Merge branch 'task-5849-3-squashed'