]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
11 years agoRudimentary-but-sufficient passphrase-encrypted box code.
Nick Mathewson [Thu, 28 Aug 2014 21:59:06 +0000 (17:59 -0400)] 
Rudimentary-but-sufficient passphrase-encrypted box code.

See crypto_pwbox.c for a description of the file format.

There are tests for successful operation, but it still needs
error-case tests.

11 years agoMore generic passphrase hashing code, including scrypt support
Nick Mathewson [Thu, 28 Aug 2014 21:38:22 +0000 (17:38 -0400)] 
More generic passphrase hashing code, including scrypt support

Uses libscrypt when found; otherwise, we don't have scrypt and we
only support openpgp rfc2440 s2k hashing, or pbkdf2.

Includes documentation and unit tests; coverage around 95%. Remaining
uncovered code is sanity-checks that shouldn't be reachable fwict.

11 years agoMove secret-to-key functionality into a separate module
Nick Mathewson [Thu, 28 Aug 2014 16:04:22 +0000 (12:04 -0400)] 
Move secret-to-key functionality into a separate module

I'm about to add more of these, so we might as well trudge forward.

11 years agoRename secret_to_key to secret_to_key_rfc2440
Nick Mathewson [Fri, 18 Oct 2013 18:35:49 +0000 (11:35 -0700)] 
Rename secret_to_key to secret_to_key_rfc2440

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Thu, 28 Aug 2014 12:36:00 +0000 (08:36 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoResume expanding abbreviations for command-line options
Roger Dingledine [Wed, 27 Aug 2014 10:10:35 +0000 (06:10 -0400)] 
Resume expanding abbreviations for command-line options

The fix for bug 4647 accidentally removed our hack from bug 586 that
rewrote HashedControlPassword to __HashedControlSessionPassword when
it appears on the commandline (which allowed the user to set her own
HashedControlPassword in the torrc file while the controller generates
a fresh session password for each run).

Fixes bug 12948; bugfix on 0.2.5.1-alpha.

11 years agoInitialize crash handler in unit tests
Nick Mathewson [Wed, 27 Aug 2014 22:15:02 +0000 (18:15 -0400)] 
Initialize crash handler in unit tests

This way, we don't get locking failures when we hit an assertion in
the unit tests.  Also, we might find out about unit test bugs from
folks who can't do gdb.

11 years agoMerge remote-tracking branch 'public/bug10163'
Nick Mathewson [Tue, 26 Aug 2014 13:44:16 +0000 (09:44 -0400)] 
Merge remote-tracking branch 'public/bug10163'

11 years agoRemove the assigned-but-unused chosen_named_idx local variable
Nick Mathewson [Mon, 25 Aug 2014 15:26:08 +0000 (11:26 -0400)] 
Remove the assigned-but-unused chosen_named_idx local variable

It had been used in consensus method 1.  But now that 13 is the
minimum (see #10163), we don't need it around.

Found by sysrqb.

11 years agoFix another memory leak case in sandbox.c:prot_strings()
Nick Mathewson [Mon, 25 Aug 2014 15:14:31 +0000 (11:14 -0400)] 
Fix another memory leak case in sandbox.c:prot_strings()

This is related to the rest of 523587a5cf62119baa01822e2e783925726a790b

11 years agoUse the ARRAY_LENGTH macro more consistently.
Nick Mathewson [Sun, 24 Aug 2014 17:35:48 +0000 (13:35 -0400)] 
Use the ARRAY_LENGTH macro more consistently.

11 years agoRemove the non-implemented versions of the sandbox _array() functions
Nick Mathewson [Sun, 24 Aug 2014 17:35:30 +0000 (13:35 -0400)] 
Remove the non-implemented versions of the sandbox _array() functions

11 years agoWhitespace fixes
Nick Mathewson [Sun, 24 Aug 2014 17:32:39 +0000 (13:32 -0400)] 
Whitespace fixes

11 years agoTerser ways to sandbox-allow related filenames
Nick Mathewson [Sun, 24 Aug 2014 17:30:55 +0000 (13:30 -0400)] 
Terser ways to sandbox-allow related filenames

Using the *_array() functions here confused coverity, and was actually
a bit longer than we needed.  Now we just use macros for the repeated
bits, so that we can mention a file and a suffix-appended version in
one line.

11 years agoMerge branch 'bug11792_1_squashed'
Nick Mathewson [Sun, 24 Aug 2014 17:09:08 +0000 (13:09 -0400)] 
Merge branch 'bug11792_1_squashed'

Conflicts:
src/or/circuitlist.c

11 years agoWhen looking for conns to close, count the age of linked queued data
Nick Mathewson [Tue, 19 Aug 2014 15:27:52 +0000 (11:27 -0400)] 
When looking for conns to close, count the age of linked queued data

Specifically, count the age of the data queued in a linked directory
connection's buffers when counting a stream's age.

11 years agoKill non-tunneled directory connections when handling OOM.
Nick Mathewson [Tue, 19 Aug 2014 15:25:48 +0000 (11:25 -0400)] 
Kill non-tunneled directory connections when handling OOM.

Another part of 11792.

11 years agoCount zlib buffer memory towards OOM totals.
Nick Mathewson [Tue, 19 Aug 2014 14:59:15 +0000 (10:59 -0400)] 
Count zlib buffer memory towards OOM totals.

Part of 11792.

(Uses the zlib-endorsed formula for memory needs for inflate/deflate
from "zconf.h".)

11 years agoTidy status handling in rendservice.c
Nick Mathewson [Thu, 21 Aug 2014 14:49:01 +0000 (10:49 -0400)] 
Tidy status handling in rendservice.c

We had some code to fix up the 'status' return value to -1 on error
if it wasn't set, but it was unreachable because our code was
correct.  Tweak this by initializing status to -1, and then only
setting it to 0 on success.  Also add a goto which was missing: its
absence was harmless.

[CID 718614, 718616]

11 years agoMerge branch 'coverity_20140821'
Nick Mathewson [Thu, 21 Aug 2014 16:14:00 +0000 (12:14 -0400)] 
Merge branch 'coverity_20140821'

11 years agofix memory leak on failure in sandbox.c:prot_strings()
Nick Mathewson [Thu, 21 Aug 2014 15:40:48 +0000 (11:40 -0400)] 
fix memory leak on failure in sandbox.c:prot_strings()

[CID 1205014]

11 years agoStore sandbox params as char *, since that's what they are.
Nick Mathewson [Thu, 21 Aug 2014 15:20:29 +0000 (11:20 -0400)] 
Store sandbox params as char *, since that's what they are.

This allows coverity to infer that we aren't leaking them.

[Fixes a lot of CIDs]

11 years agoCheck for duplicate arguments to tor-gencert
Nick Mathewson [Thu, 21 Aug 2014 15:09:40 +0000 (11:09 -0400)] 
Check for duplicate arguments to tor-gencert

Found by coverity, which noticed that if you said
  tor-gencert -i identity1 -i identity2
we would leak "identity1".

[CID 119820111982021198203]

11 years agoMark one use of networkstatus_check_document_signature as (void)
Nick Mathewson [Thu, 21 Aug 2014 15:05:59 +0000 (11:05 -0400)] 
Mark one use of networkstatus_check_document_signature as (void)

Also explain why we aren't checking its return value.

[CID 1198197]

11 years agoremove meaningless checks for chunks==NULL in dirserv stuff
Nick Mathewson [Thu, 21 Aug 2014 15:01:44 +0000 (11:01 -0400)] 
remove meaningless checks for chunks==NULL in dirserv stuff

Also, make it clearer that chunks cannot be NULL

[CID 10317501031751]

11 years agoSuppress coverity warning about overflowing in safe_mem_is_zero
Nick Mathewson [Thu, 21 Aug 2014 14:44:13 +0000 (10:44 -0400)] 
Suppress coverity warning about overflowing in safe_mem_is_zero

The unsigned underflow here is defined and intentional.

CID 202482

11 years agoAvoid performing an assert on an always-true value
Nick Mathewson [Thu, 21 Aug 2014 14:56:36 +0000 (10:56 -0400)] 
Avoid performing an assert on an always-true value

This was freaking out coverity.

[CID 743379]

11 years agoSuppress coverity warning about overflowing in tor_memeq.
Nick Mathewson [Thu, 21 Aug 2014 14:44:13 +0000 (10:44 -0400)] 
Suppress coverity warning about overflowing in tor_memeq.

The unsigned underflow here is defined and intentional.

CID 202482

11 years agoCheck return values for fcntl in tor_spawn_background.
Nick Mathewson [Thu, 21 Aug 2014 14:38:19 +0000 (10:38 -0400)] 
Check return values for fcntl in tor_spawn_background.

[CID 718609]

11 years agoAllow rend_service_intro_free to get called with NULL
Nick Mathewson [Thu, 21 Aug 2014 14:34:29 +0000 (10:34 -0400)] 
Allow rend_service_intro_free to get called with NULL

(We allowed it previously, but produced an LD_BUG message when it
happened, which is not consistent

Also, remove inconsistent NULL checks before calling
rend_service_intro_free.

(Removing the check is for CID 718613)

11 years agoRemove a dead check for errmsg in handle_control_authenticate
Nick Mathewson [Thu, 21 Aug 2014 14:27:43 +0000 (10:27 -0400)] 
Remove a dead check for errmsg in handle_control_authenticate

Coverity doesn't like doing NULL checks on things that can't be
NULL; I like checking things where the logic for their not being
NULL is nontrivial.  Let's compromise, and make it obvious that this
field can't be NULL.

[Coverity CID 202004]

11 years agoAdd a missing goto to an unusable branch and make the branch LD_BUG.
Nick Mathewson [Thu, 21 Aug 2014 14:21:17 +0000 (10:21 -0400)] 
Add a missing goto to an unusable branch and make the branch LD_BUG.

(It's LD_BUG to reach this point because the hashed password values
were tested earlier from options_validate)

[Coverity CID 1232091]

11 years agoExplicitly cast when dividing ints then implicitly casting to double.
Nick Mathewson [Thu, 21 Aug 2014 14:19:26 +0000 (10:19 -0400)] 
Explicitly cast when dividing ints then implicitly casting to double.

Coverity thinks that when we do "double x = int1/int2;", we probably
meant "double x = ((double)int1) / int2;".  In these cases, we
didn't.

[Coverity CID 1232089 and 1232090]

11 years agoFix memory leaks in test_entrynodes.c
Nick Mathewson [Thu, 21 Aug 2014 14:18:17 +0000 (10:18 -0400)] 
Fix memory leaks in test_entrynodes.c

[Coverity CID 1232087 and 1232088]

11 years agoMake the two branches of tor_tls_used_v1_handshake into one.
Nick Mathewson [Thu, 21 Aug 2014 14:12:54 +0000 (10:12 -0400)] 
Make the two branches of tor_tls_used_v1_handshake into one.

(Coverity thinks that "if (a) X; else X;" is probably a bug.)

[Coverity CID 1232086]

11 years agoMerge branch 'bug12205_take2_squashed'
Nick Mathewson [Wed, 20 Aug 2014 19:32:48 +0000 (15:32 -0400)] 
Merge branch 'bug12205_take2_squashed'

11 years agoWhitespace fixes
Nick Mathewson [Wed, 20 Aug 2014 19:32:35 +0000 (15:32 -0400)] 
Whitespace fixes

11 years agoSmall cleanups to test_entry_is_time_to_retry
Nick Mathewson [Wed, 20 Aug 2014 19:31:25 +0000 (15:31 -0400)] 
Small cleanups to test_entry_is_time_to_retry

11 years agoUnit testing entry_is_time_to_retry().
rl1987 [Wed, 20 Aug 2014 19:07:08 +0000 (22:07 +0300)] 
Unit testing entry_is_time_to_retry().

11 years agoWrite comments for members of periods array.
rl1987 [Tue, 19 Aug 2014 19:23:11 +0000 (22:23 +0300)] 
Write comments for members of periods array.

11 years agoRewriting entry_is_time_to_retry() using table approach.
rl1987 [Tue, 19 Aug 2014 19:12:19 +0000 (22:12 +0300)] 
Rewriting entry_is_time_to_retry() using table approach.

11 years agoMerge branch 'bug10116_squashed'
Nick Mathewson [Wed, 20 Aug 2014 18:52:24 +0000 (14:52 -0400)] 
Merge branch 'bug10116_squashed'

11 years agoDon't allocate an extra smartlist in the OOM handler
Nick Mathewson [Fri, 15 Aug 2014 21:37:39 +0000 (17:37 -0400)] 
Don't allocate an extra smartlist in the OOM handler

Fixes issue 10116

11 years agofix remaining compilation problems
Nick Mathewson [Fri, 15 Aug 2014 21:02:28 +0000 (17:02 -0400)] 
fix remaining compilation problems

11 years agoFix return value of tor_fd_seekend.
Nick Mathewson [Wed, 20 Aug 2014 17:48:17 +0000 (13:48 -0400)] 
Fix return value of tor_fd_seekend.

Previously, we had documented it to return -1 or 0, when in fact
lseek returns -1 or the new position in the file.

This is harmless, since we were only checking for negative values
when we used tor_fd_seekend.

11 years agoAllow named pipes for our log files.
Nick Mathewson [Wed, 20 Aug 2014 17:45:16 +0000 (13:45 -0400)] 
Allow named pipes for our log files.

Closes ticket 12061. Based on a patch from "carlo von lynX" on tor-dev at
  https://lists.torproject.org/pipermail/tor-dev/2014-April/006705.html

11 years agoMerge remote-tracking branch 'public/bug11787'
Nick Mathewson [Wed, 20 Aug 2014 17:34:02 +0000 (13:34 -0400)] 
Merge remote-tracking branch 'public/bug11787'

11 years agoChanges file for bug 11787
Nick Mathewson [Wed, 20 Aug 2014 17:33:49 +0000 (13:33 -0400)] 
Changes file for bug 11787

11 years agoMerge remote-tracking branch 'public/bug12908_025'
Nick Mathewson [Wed, 20 Aug 2014 16:58:26 +0000 (12:58 -0400)] 
Merge remote-tracking branch 'public/bug12908_025'

11 years agoWarn if Tor is a relay and a HS
Sathyanarayanan Gunasekaran [Tue, 22 Jul 2014 04:16:58 +0000 (21:16 -0700)] 
Warn if Tor is a relay and a HS

Closes 12908; see #8742

11 years agoMerge remote-tracking branch 'public/bug12728_024'
Nick Mathewson [Wed, 20 Aug 2014 16:44:15 +0000 (12:44 -0400)] 
Merge remote-tracking branch 'public/bug12728_024'

11 years agoFix entrynodes test fails because of outdated test vectors.
George Kadianakis [Wed, 20 Aug 2014 14:07:19 +0000 (17:07 +0300)] 
Fix entrynodes test fails because of outdated test vectors.

11 years agoMerge remote-tracking branch 'public/bug12700_024'
Nick Mathewson [Wed, 20 Aug 2014 13:00:41 +0000 (09:00 -0400)] 
Merge remote-tracking branch 'public/bug12700_024'

11 years agoWhen counting memory from closing a connection, count the dir conn too
Nick Mathewson [Mon, 18 Aug 2014 19:21:50 +0000 (15:21 -0400)] 
When counting memory from closing a connection, count the dir conn too

Fix part of bug 11972

11 years agoFix relay_command_to_string(); solve 12700.
Nick Mathewson [Mon, 18 Aug 2014 17:19:43 +0000 (13:19 -0400)] 
Fix relay_command_to_string(); solve 12700.

Two bugs here:
  1) We didn't add EXTEND2/EXTENDED2 to relay_command_to_string().

  2) relay_command_to_string() didn't log the value of unrecognized
     commands.

Both fixed here.

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Mon, 18 Aug 2014 14:20:37 +0000 (10:20 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoFix windows warning introduced by 0808ed83f9cf312abe229
Nick Mathewson [Mon, 18 Aug 2014 14:19:05 +0000 (10:19 -0400)] 
Fix windows warning introduced by 0808ed83f9cf312abe229

This will fix the warning
   "/src/or/config.c:6854:48: error: unused parameter 'group_readable'"
that I introduced while fixing 12864.

Bug not in any released version of Tor.

11 years agoImprove comments in checkSpace.pl to explain how to fix its warnings
Nick Mathewson [Mon, 18 Aug 2014 14:03:14 +0000 (10:03 -0400)] 
Improve comments in checkSpace.pl to explain how to fix its warnings

11 years agochanges file for bug 10163 / proposal 215.
Nick Mathewson [Fri, 15 Aug 2014 22:15:30 +0000 (18:15 -0400)] 
changes file for bug 10163 / proposal 215.

11 years agoRemove implementation code for all pre-13 consensus methods.
Nick Mathewson [Fri, 15 Aug 2014 22:11:26 +0000 (18:11 -0400)] 
Remove implementation code for all pre-13 consensus methods.

Also remove a test for the way that we generated parameter votes
before consensus method 12.

11 years agoRemove support for generating consensuses with methods <= 9.
Nick Mathewson [Fri, 15 Aug 2014 22:05:53 +0000 (18:05 -0400)] 
Remove support for generating consensuses with methods <= 9.

The last patch disabled these; this one removes the code to implement
them.

11 years agoNo longer advertise or negotiate any consensus method before 13.
Nick Mathewson [Fri, 15 Aug 2014 21:51:16 +0000 (17:51 -0400)] 
No longer advertise or negotiate any consensus method before 13.

Implements proposal 215; closes ticket 10163.

Why?  From proposal 215:

   Consensus method 1 is no longer viable for the Tor network.  It
   doesn't result in a microdescriptor consensus, and omits other
   fields that clients need in order to work well.  Consensus methods
   under 12 have security issues, since they let a single authority
   set a consensus parameter.
...
   For example, while Tor 0.2.4.x is under development, authorities
   should really not be running anything before Tor 0.2.3.x.  Tor
   0.2.3.x has supported consensus method 13 since 0.2.3.21-rc, so
   it's okay for 0.2.4.x to require 13 as the minimum method.  We even
   might go back to method 12, since the worst outcome of not using 13
   would be some warnings in client logs.  Consensus method 12 was a
   security improvement, so we don't want to roll back before that.

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Fri, 15 Aug 2014 21:41:13 +0000 (17:41 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoMerge remote-tracking branch 'asn/nickm-bug12864_025' into maint-0.2.5
Nick Mathewson [Fri, 15 Aug 2014 21:40:13 +0000 (17:40 -0400)] 
Merge remote-tracking branch 'asn/nickm-bug12864_025' into maint-0.2.5

11 years agoHand-fix a few global_circuit_list cases
Nick Mathewson [Fri, 15 Aug 2014 20:32:32 +0000 (16:32 -0400)] 
Hand-fix a few global_circuit_list cases

11 years agoAutoconvert most circuit-list iterations to smartlist iterations
Nick Mathewson [Fri, 15 Aug 2014 20:23:22 +0000 (16:23 -0400)] 
Autoconvert most circuit-list iterations to smartlist iterations

Breaks compilation.

Used this coccinelle script:

@@
identifier c;
typedef circuit_t;
iterator name TOR_LIST_FOREACH;
iterator name SMARTLIST_FOREACH_BEGIN;
statement S;
@@
- circuit_t *c;
   ...
- TOR_LIST_FOREACH(c, \(&global_circuitlist\|circuit_get_global_list()\), head)
+ SMARTLIST_FOREACH_BEGIN(circuit_get_global_list(), circuit_t *, c)
  S
+ SMARTLIST_FOREACH_END(c);

11 years agoSome documentation fixes for #12864.
George Kadianakis [Fri, 15 Aug 2014 20:12:06 +0000 (23:12 +0300)] 
Some documentation fixes for #12864.

11 years agoStart converting circuitlist to smartlist.
Nick Mathewson [Fri, 15 Aug 2014 19:42:14 +0000 (15:42 -0400)] 
Start converting circuitlist to smartlist.

11 years agoAdd scripts/coccinelle to scripts/README
Nick Mathewson [Fri, 15 Aug 2014 15:03:15 +0000 (11:03 -0400)] 
Add scripts/coccinelle to scripts/README

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Fri, 15 Aug 2014 14:07:04 +0000 (10:07 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoMissing changes file for 3f683aadcd03c311c1
Nick Mathewson [Fri, 15 Aug 2014 14:06:27 +0000 (10:06 -0400)] 
Missing changes file for 3f683aadcd03c311c1

Looks like I forgot to commit this.

11 years agoRemove stale printfs from buffer/zlib_fin_at_chunk_end test
Nick Mathewson [Fri, 15 Aug 2014 13:34:10 +0000 (09:34 -0400)] 
Remove stale printfs from buffer/zlib_fin_at_chunk_end test

These got committed by mistake.

11 years agoDocumentation fix for policy_summarize().
Nick Mathewson [Fri, 15 Aug 2014 12:52:38 +0000 (08:52 -0400)] 
Documentation fix for policy_summarize().

Spotted by "epilys"

11 years agoDocumentation fix on arguments to CookieAuthFileGroupReadable
Nick Mathewson [Fri, 15 Aug 2014 12:32:54 +0000 (08:32 -0400)] 
Documentation fix on arguments to CookieAuthFileGroupReadable

We don't actually allow a group name, but the documentation implied
that we did.

11 years agoRestore functionality for CookieAuthFileGroupReadable.
Nick Mathewson [Fri, 15 Aug 2014 12:30:44 +0000 (08:30 -0400)] 
Restore functionality for CookieAuthFileGroupReadable.

When we merged the cookieauthfile creation logic in 33c3e60a37, we
accidentally took out this feature.  Fixes bug 12864, bugfix on
0.2.5.1-alpha.

Also adds an ExtORPortCookieAuthFileGroupReadable, since there's no
reason not to.

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Thu, 14 Aug 2014 03:15:44 +0000 (23:15 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoMerge remote-tracking branch 'public/bug12848_024' into maint-0.2.5
Nick Mathewson [Thu, 14 Aug 2014 03:14:28 +0000 (23:14 -0400)] 
Merge remote-tracking branch 'public/bug12848_024' into maint-0.2.5

Conflicts:
src/or/circuitbuild.c

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Wed, 13 Aug 2014 19:11:52 +0000 (15:11 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoApply an MSVC compilation fix from Gisle Vanem
Nick Mathewson [Wed, 13 Aug 2014 19:11:00 +0000 (15:11 -0400)] 
Apply an MSVC compilation fix from Gisle Vanem

This fixes a double-define introduced in 28538069b2f1909a7600ec6d

11 years agoMerge remote-tracking branch 'public/use_calloc'
Nick Mathewson [Wed, 13 Aug 2014 19:01:04 +0000 (15:01 -0400)] 
Merge remote-tracking branch 'public/use_calloc'

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Wed, 13 Aug 2014 16:52:57 +0000 (12:52 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoMerge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
Nick Mathewson [Wed, 13 Aug 2014 16:52:40 +0000 (12:52 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5

11 years agoMerge remote-tracking branch 'karsten/geoip6-aug2014' into maint-0.2.4
Nick Mathewson [Wed, 13 Aug 2014 16:51:38 +0000 (12:51 -0400)] 
Merge remote-tracking branch 'karsten/geoip6-aug2014' into maint-0.2.4

11 years agoMerge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
Nick Mathewson [Wed, 13 Aug 2014 16:51:27 +0000 (12:51 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4

11 years agoFix whitespace issues
Nick Mathewson [Wed, 13 Aug 2014 14:42:20 +0000 (10:42 -0400)] 
Fix whitespace issues

11 years agoAdd changes file for bug12855
Nick Mathewson [Wed, 13 Aug 2014 14:38:12 +0000 (10:38 -0400)] 
Add changes file for bug12855

11 years agoApply coccinelle script to replace malloc(a*b)->calloc(a,b)
Nick Mathewson [Wed, 13 Aug 2014 14:36:06 +0000 (10:36 -0400)] 
Apply coccinelle script to replace malloc(a*b)->calloc(a,b)

11 years agoAdd a simple coccinelle script to replace malloc->calloc
Nick Mathewson [Wed, 13 Aug 2014 14:31:31 +0000 (10:31 -0400)] 
Add a simple coccinelle script to replace malloc->calloc

Coccinelle is a semantic patching tool that can automatically change
C code via semantic patching.

This script also replaces realloc with reallocarray as appropriate.

11 years agoAdd reallocarray clone so we can stop doing multiply-then-reallocate
Nick Mathewson [Wed, 13 Aug 2014 14:27:13 +0000 (10:27 -0400)] 
Add reallocarray clone so we can stop doing multiply-then-reallocate

11 years agoUpdate geoip6 to the August 7 2014 database.
Karsten Loesing [Wed, 13 Aug 2014 14:16:11 +0000 (16:16 +0200)] 
Update geoip6 to the August 7 2014 database.

11 years agoUpdate geoip to the August 7 2014 database.
Karsten Loesing [Wed, 13 Aug 2014 14:08:33 +0000 (16:08 +0200)] 
Update geoip to the August 7 2014 database.

11 years agoFix another case of 12848 in circuit_handle_first_hop
Nick Mathewson [Tue, 12 Aug 2014 16:15:09 +0000 (12:15 -0400)] 
Fix another case of 12848 in circuit_handle_first_hop

I looked for other places where we set circ->n_chan early, and found
one in circuit_handle_first_hop() right before it calls
circuit_send_next_onion_skin(). If onion_skin_create() fails there,
then n_chan will still be set when circuit_send_next_onion_skin()
returns. We should probably fix that too.

11 years agoAdd an extra check in channel_send_destroy for circID==0
Nick Mathewson [Tue, 12 Aug 2014 16:14:05 +0000 (12:14 -0400)] 
Add an extra check in channel_send_destroy for circID==0

Prevents other cases of 12848.

11 years agoDon't send DESTROY to circID 0 when circuit_deliver_create_cell fails
Nick Mathewson [Tue, 12 Aug 2014 16:10:57 +0000 (12:10 -0400)] 
Don't send DESTROY to circID 0 when circuit_deliver_create_cell fails

Cypherpunks found this and wrote this patch.

Fix for 12848; fix on (I think) d58d4c0d, which went into 0.0.8pre1

11 years agoFix some URLs in the README
Nick Mathewson [Sat, 9 Aug 2014 19:57:06 +0000 (15:57 -0400)] 
Fix some URLs in the README

patch from mttp; fixes 12830

11 years agofix extra words in man page
Roger Dingledine [Sat, 9 Aug 2014 19:40:40 +0000 (15:40 -0400)] 
fix extra words in man page

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Fri, 8 Aug 2014 14:09:17 +0000 (10:09 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoBuild circuits more readily when DisableNetwork goes to 0
Roger Dingledine [Tue, 5 Aug 2014 20:54:46 +0000 (16:54 -0400)] 
Build circuits more readily when DisableNetwork goes to 0

When Tor starts with DisabledNetwork set, it would correctly
conclude that it shouldn't try making circuits, but it would
mistakenly cache this conclusion and continue believing it even
when DisableNetwork is set to 0. Fixes the bug introduced by the
fix for bug 11200; bugfix on 0.2.5.4-alpha.

11 years agofix three typos in comments
Roger Dingledine [Wed, 6 Aug 2014 06:20:51 +0000 (02:20 -0400)] 
fix three typos in comments

11 years agoCorrectly remove extraneous space in router family lines
Nick Mathewson [Tue, 5 Aug 2014 15:09:08 +0000 (11:09 -0400)] 
Correctly remove extraneous space in router family lines

Fixes bug 12728; bugfix on 0.2.1.7-alpha when the SPLIT_IGNORE_SPACE
option was added.