]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
11 years agoTell autoconf to make the compiler act as c99
Nick Mathewson [Thu, 25 Sep 2014 15:36:28 +0000 (11:36 -0400)] 
Tell autoconf to make the compiler act as c99

Apparently some compilers want extra switches.

11 years agoTweak address.c to use a little c99 syntax
Nick Mathewson [Thu, 25 Sep 2014 15:22:02 +0000 (11:22 -0400)] 
Tweak address.c to use a little c99 syntax

Since address.c is the first file to get compiled, let's have it use
a little judicious c99 in order to catch broken compilers that
somehow make it past our autoconf tests.

11 years agoRequire two c99 features (midblock decls, designated initializers)
Nick Mathewson [Thu, 25 Sep 2014 15:20:04 +0000 (11:20 -0400)] 
Require two c99 features (midblock decls, designated initializers)

c99 lets us do neat stuff like:

    {
      int j, k;
      foo(&j, &k);
      int z = j + k;
    }

and also
    struct point { int x; int y; };
    struct point pt = { .x=5, .y=5 };

This commit makes the configure scripts check to make sure your
compiler implements them.  It also disables our longstanding warning
about midblock declarations.

Closes ticket 13233.

11 years agotwo more typos
Roger Dingledine [Tue, 23 Sep 2014 22:30:02 +0000 (18:30 -0400)] 
two more typos

11 years ago+ is not how we say concatenate
Roger Dingledine [Tue, 23 Sep 2014 00:09:03 +0000 (20:09 -0400)] 
+ is not how we say concatenate

11 years agoMerge remote-tracking branch 'public/bug12693_025'
Nick Mathewson [Mon, 22 Sep 2014 18:45:38 +0000 (14:45 -0400)] 
Merge remote-tracking branch 'public/bug12693_025'

11 years agoMerge branch 'master' of git-rw.torproject.org:/tor
Nick Mathewson [Mon, 22 Sep 2014 18:35:14 +0000 (14:35 -0400)] 
Merge branch 'master' of git-rw.torproject.org:/tor

11 years agoMerge branch 'bug8197_squashed'
Nick Mathewson [Mon, 22 Sep 2014 18:34:52 +0000 (14:34 -0400)] 
Merge branch 'bug8197_squashed'

Conflicts:
src/test/test_policy.c

11 years agoand forward-port those changelogs too
Roger Dingledine [Mon, 22 Sep 2014 18:21:26 +0000 (14:21 -0400)] 
and forward-port those changelogs too

11 years agoWriting comments for newly added functions.
rl1987 [Sun, 21 Sep 2014 11:35:48 +0000 (14:35 +0300)] 
Writing comments for newly added functions.

11 years agoAdding changes file for 8197.
rl1987 [Sun, 14 Sep 2014 14:35:13 +0000 (17:35 +0300)] 
Adding changes file for 8197.

11 years agoWhitespace fixes
rl1987 [Sun, 14 Sep 2014 14:07:05 +0000 (17:07 +0300)] 
Whitespace fixes

11 years agoUsing the new API in unit-test.
rl1987 [Sat, 13 Sep 2014 16:32:35 +0000 (19:32 +0300)] 
Using the new API in unit-test.

11 years agoNew API for policies_parse_exit_policy().
rl1987 [Sat, 13 Sep 2014 13:25:48 +0000 (16:25 +0300)] 
New API for policies_parse_exit_policy().

11 years agochanges file for 12884
Nick Mathewson [Mon, 22 Sep 2014 14:55:53 +0000 (10:55 -0400)] 
changes file for 12884

11 years agoRemove config options that have been obsolete since 0.2.3
Adrien BAK [Mon, 22 Sep 2014 14:55:01 +0000 (10:55 -0400)] 
Remove config options that have been obsolete since 0.2.3

11 years agoMerge remote-tracking branch 'arma/feature13211'
Nick Mathewson [Mon, 22 Sep 2014 14:49:10 +0000 (10:49 -0400)] 
Merge remote-tracking branch 'arma/feature13211'

11 years agoMerge remote-tracking branch 'arma/feature13153'
Nick Mathewson [Mon, 22 Sep 2014 14:42:54 +0000 (10:42 -0400)] 
Merge remote-tracking branch 'arma/feature13153'

11 years agochanges file for 7733
Nick Mathewson [Mon, 22 Sep 2014 14:39:51 +0000 (10:39 -0400)] 
changes file for 7733

11 years agoMerge remote-tracking branch 'public/bug7733a'
Nick Mathewson [Mon, 22 Sep 2014 14:38:05 +0000 (10:38 -0400)] 
Merge remote-tracking branch 'public/bug7733a'

11 years agoMerge remote-tracking branch 'intrigeri/bug13196-systemd-writable-run-directory'
Nick Mathewson [Mon, 22 Sep 2014 14:31:24 +0000 (10:31 -0400)] 
Merge remote-tracking branch 'intrigeri/bug13196-systemd-writable-run-directory'

11 years agoclients use optimistic data when reaching hidden services
Roger Dingledine [Mon, 22 Sep 2014 00:02:12 +0000 (20:02 -0400)] 
clients use optimistic data when reaching hidden services

Allow clients to use optimistic data when connecting to a hidden service,
which should cut out the initial round-trip for client-side programs
including Tor Browser.

(Now that Tor 0.2.2.x is obsolete, all hidden services should support
server-side optimistic data.)

See proposal 181 for details. Implements ticket 13211.

11 years agoUse optimistic data even if we don't know exitnode->rs
Roger Dingledine [Sun, 21 Sep 2014 23:12:20 +0000 (19:12 -0400)] 
Use optimistic data even if we don't know exitnode->rs

I think we should know the routerstatus for our exit relay, since
we built a circuit to it. So I think this is just a code simplication.

11 years agoget rid of routerstatus->version_supports_optimistic_data
Roger Dingledine [Sun, 21 Sep 2014 23:04:18 +0000 (19:04 -0400)] 
get rid of routerstatus->version_supports_optimistic_data

Clients are now willing to send optimistic circuit data (before they
receive a 'connected' cell) to relays of any version. We used to
only do it for relays running 0.2.3.1-alpha or later, but now all
relays are new enough.

Resolves ticket 13153.

11 years agoget rid of trivial redundant comment
Roger Dingledine [Sun, 21 Sep 2014 22:56:48 +0000 (18:56 -0400)] 
get rid of trivial redundant comment

11 years agoStop silently skipping invalid args to setevents
Roger Dingledine [Sun, 21 Sep 2014 05:23:39 +0000 (01:23 -0400)] 
Stop silently skipping invalid args to setevents

Return an error when the second or later arguments of the
"setevents" controller command are invalid events. Previously we
would return success while silently skipping invalid events.

Fixes bug 13205; bugfix on 0.2.3.2-alpha. Reported by "fpxnns".

11 years agoMerge branch 'maint-0.2.5'
Roger Dingledine [Sat, 20 Sep 2014 20:51:17 +0000 (16:51 -0400)] 
Merge branch 'maint-0.2.5'

11 years agoMerge branch 'maint-0.2.4' into maint-0.2.5
Roger Dingledine [Sat, 20 Sep 2014 20:50:32 +0000 (16:50 -0400)] 
Merge branch 'maint-0.2.4' into maint-0.2.5

Conflicts:
src/or/config.c

11 years agoMerge branch 'maint-0.2.3' into maint-0.2.4
Roger Dingledine [Sat, 20 Sep 2014 20:49:24 +0000 (16:49 -0400)] 
Merge branch 'maint-0.2.3' into maint-0.2.4

11 years agogabelmoo's IPv4 address changed
Sebastian Hahn [Fri, 19 Sep 2014 11:40:37 +0000 (13:40 +0200)] 
gabelmoo's IPv4 address changed

11 years agoAdd changes file for #13196.
intrigeri [Fri, 19 Sep 2014 16:07:31 +0000 (16:07 +0000)] 
Add changes file for #13196.

Note that this will likely need to be folded with the changes file for #12751,
as this change is a mere fixup on top of the changes introduced for #12751.

11 years agosystemd unit file: set up /var/run/tor as writable for the Tor service.
intrigeri [Fri, 19 Sep 2014 16:04:59 +0000 (16:04 +0000)] 
systemd unit file: set up /var/run/tor as writable for the Tor service.

For some strange reason, this was not needed with systemd v208.
But it's needed with systemd v215 on current Debian sid, and entirely
makes sense.

11 years agoMerge branch 'bug4244b_squashed'
Nick Mathewson [Thu, 18 Sep 2014 19:31:08 +0000 (15:31 -0400)] 
Merge branch 'bug4244b_squashed'

11 years agoClients no longer write "DirReqStatistics 0" in their saveconf output
Roger Dingledine [Thu, 11 Sep 2014 03:01:18 +0000 (23:01 -0400)] 
Clients no longer write "DirReqStatistics 0" in their saveconf output

Stop modifying the value of our DirReqStatistics torrc option just
because we're not a bridge or relay. This bug was causing Tor
Browser users to write "DirReqStatistics 0" in their torrc files
as if they had chosen to change the config.

Fixes bug 4244; bugfix on 0.2.3.1-alpha.

11 years agoFix a double-free in failing case of handle_control_authenticate.
Nick Mathewson [Thu, 18 Sep 2014 15:13:57 +0000 (11:13 -0400)] 
Fix a double-free in failing case of handle_control_authenticate.

Bugfix on ed8f020e205267e6270494634346ab68d830e1d8; bug not in any
released version of Tor.  Found by Coverity; this is CID 1239290.

11 years agoUse the DL_SCHED_CONSENSUS schedule for consensuses.
Nick Mathewson [Thu, 18 Sep 2014 14:51:44 +0000 (10:51 -0400)] 
Use the DL_SCHED_CONSENSUS schedule for consensuses.

Fixes bug 11679; bugfix on 0.2.2.6-alpha

11 years agoActivate INSTRUMENT_DOWNLOADS under clang analyzer as well as coverity
Nick Mathewson [Thu, 18 Sep 2014 14:23:14 +0000 (10:23 -0400)] 
Activate INSTRUMENT_DOWNLOADS under clang analyzer as well as coverity

Patch from teor; ticket 13177.

11 years agoFix a windows unused-arg warning
Nick Mathewson [Wed, 17 Sep 2014 15:00:27 +0000 (11:00 -0400)] 
Fix a windows unused-arg warning

11 years agoMerge remote-tracking branch 'public/ticket_13119_v3'
Nick Mathewson [Wed, 17 Sep 2014 14:27:40 +0000 (10:27 -0400)] 
Merge remote-tracking branch 'public/ticket_13119_v3'

11 years agotorrc.sample: Fix units
Peter Palfrader [Wed, 10 Sep 2014 15:18:34 +0000 (17:18 +0200)] 
torrc.sample: Fix units

11 years agoIgnore coverage_html/
Arlo Breault [Wed, 10 Sep 2014 15:14:05 +0000 (08:14 -0700)] 
Ignore coverage_html/

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Tue, 16 Sep 2014 15:11:48 +0000 (11:11 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoAdd coccinelle script to remove pointless callocs
Nick Mathewson [Tue, 16 Sep 2014 15:11:17 +0000 (11:11 -0400)] 
Add coccinelle script to remove pointless callocs

11 years agoMerge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5
Nick Mathewson [Tue, 16 Sep 2014 15:10:02 +0000 (11:10 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5

11 years agoclients now send correct address for rendezvous point
Roger Dingledine [Sun, 14 Sep 2014 01:49:37 +0000 (21:49 -0400)] 
clients now send correct address for rendezvous point

Clients now send the correct address for their chosen rendezvous point
when trying to access a hidden service. They used to send the wrong
address, which would still work some of the time because they also
sent the identity digest of the rendezvous point, and if the hidden
service happened to try connecting to the rendezvous point from a relay
that already had a connection open to it, the relay would reuse that
connection. Now connections to hidden services should be more robust
and faster. Also, this bug meant that clients were leaking to the hidden
service whether they were on a little-endian (common) or big-endian (rare)
system, which for some users might have reduced their anonymity.

Fixes bug 13151; bugfix on 0.2.1.5-alpha.

11 years agoAdd script to detect and remove unCish malloc-then-cast pattern
Nick Mathewson [Tue, 16 Sep 2014 14:57:00 +0000 (10:57 -0400)] 
Add script to detect and remove unCish malloc-then-cast pattern

Also, apply it.

11 years agoclean up eol whitespace from coccinelle-generated patches
Nick Mathewson [Tue, 16 Sep 2014 13:40:38 +0000 (09:40 -0400)] 
clean up eol whitespace from coccinelle-generated patches

11 years agoRemove the legacy_test_helper and legacy_setup wrappers
Nick Mathewson [Tue, 16 Sep 2014 13:30:22 +0000 (09:30 -0400)] 
Remove the legacy_test_helper and legacy_setup wrappers

These wrappers went into place when the default type for our unit
test functions changed from "void fn(void)" to "void fn(void *arg)".

To generate this patch, I did the same hokey-pokey as before with
replacing all operators used as macro arguments, then I ran a
coccinelle script, then I ran perl script to fix up everything that
used legacy_test_helper, then I manually removed the
legacy_test_helper functions, then I ran a final perl script to put
the operators back how they were.

==============================
 #!/usr/bin/perl -w -i -p

s/==,/_X_EQ_,/g;
s/!=,/_X_NE_,/g;
s/<,/_X_LT_,/g;
s/>,/_X_GT_,/g;
s/>=,/_X_GEQ_,/g;
s/<=,/_X_LEQ_,/g;

--------------------

@@
identifier func =~ "test_.*$";
statement S, S2;
@@
 static void func (
-void
+void *arg
 )
 {
 ... when != S2
+(void) arg;
 S
 ...
 }

--------------------
 #!/usr/bin/perl -w -i -p

s/, *legacy_test_helper, *([^,]+), *\&legacy_setup, *([^\}]+) *}/, $2, $1, NULL, NULL }/g;

--------------------
 #!/usr/bin/perl -w -i -p

s/_X_NEQ_/!=/g;
s/_X_NE_/!=/g;
s/_X_EQ_/==/g;
s/_X_GT_/>/g;
s/_X_LT_/</g;
s/_X_GEQ_/>=/g;
s/_X_LEQ_/<=/g;

--------------------

11 years agoAdd a changes file for 13119
Nick Mathewson [Tue, 16 Sep 2014 01:39:12 +0000 (21:39 -0400)] 
Add a changes file for 13119

11 years agoReplace all uses of test_{str,}eq
Nick Mathewson [Tue, 16 Sep 2014 01:36:23 +0000 (21:36 -0400)] 
Replace all uses of test_{str,}eq

11 years agoReplace the remaining test_assert instances
Nick Mathewson [Tue, 16 Sep 2014 01:29:48 +0000 (21:29 -0400)] 
Replace the remaining test_assert instances

11 years agoremove two unused test_* macros
Nick Mathewson [Tue, 16 Sep 2014 01:28:26 +0000 (21:28 -0400)] 
remove two unused test_* macros

11 years agoReplace remaining uses of deprecated test_mem* functions
Nick Mathewson [Tue, 16 Sep 2014 01:27:23 +0000 (21:27 -0400)] 
Replace remaining uses of deprecated test_mem* functions

11 years agoReplace the remaining test_n?eq_ptr calls
Nick Mathewson [Tue, 16 Sep 2014 01:25:27 +0000 (21:25 -0400)] 
Replace the remaining test_n?eq_ptr calls

11 years agoMake not even macros use test_fail_msg.
Nick Mathewson [Tue, 16 Sep 2014 01:22:36 +0000 (21:22 -0400)] 
Make not even macros use test_fail_msg.

11 years agoUse coccinelle scripts to clean up our unit tests
Nick Mathewson [Tue, 16 Sep 2014 01:18:21 +0000 (21:18 -0400)] 
Use coccinelle scripts to clean up our unit tests

This should get rid of most of the users of the old test_*
functions.  Some are in macros and will need manual cleanup, though.

This patch is for 13119, and was automatically generated with these
scripts.  The perl scripts are there because coccinelle hates
operators as macro arguments.

------------------------------

s/==,/_X_EQ_,/g;
s/!=,/_X_NE_,/g;
s/<,/_X_LT_,/g;
s/>,/_X_GT_,/g;
s/>=,/_X_GEQ_,/g;
s/<=,/_X_LEQ_,/g;

------------------------------
@@
expression a;
identifier func;
@@
 func (...) {
<...
-test_fail_msg
+TT_DIE
 (
+(
 a
+)
 )
 ...>
 }

@@
identifier func;
@@
 func (...) {
<...
-test_fail()
+TT_DIE(("Assertion failed."))
 ...>
 }

@@
expression a;
identifier func;
@@
 func (...) {
<...
-test_assert
+tt_assert
(a)
 ...>
 }

@@
expression a, b;
identifier func;
@@
 func (...) {
<...
-test_eq
+tt_int_op
 (a,
+_X_EQ_,
  b)
 ...>
 }

@@
expression a, b;
identifier func;
@@
 func (...) {
<...
-test_neq
+tt_int_op
 (a,
+_X_NEQ_,
  b)
 ...>
 }

@@
expression a, b;
identifier func;
@@
 func (...) {
<...
-test_streq
+tt_str_op
 (a,
+_X_EQ_,
  b)
 ...>
 }

@@
expression a, b;
identifier func;
@@
 func (...) {
<...
-test_strneq
+tt_str_op
 (a,
+_X_NEQ_,
  b)
 ...>
 }

@@
expression a, b;
identifier func;
@@
 func (...) {
<...
-test_eq_ptr
+tt_ptr_op
 (a,
+_X_EQ_,
  b)
 ...>
 }

@@
expression a, b;
identifier func;
@@
 func() {
<...
-test_neq_ptr
+tt_ptr_op
 (a,
+_X_NEQ_,
  b)
 ...>
 }

@@
expression a, b, len;
identifier func;
@@
 func (...) {
<...
-test_memeq
+tt_mem_op
 (a,
+_X_EQ_,
  b, len)
 ...>
 }

@@
expression a, b, len;
identifier func;
@@
 func (...) {
<...
-test_memneq
+tt_mem_op
 (a,
+_X_NEQ_,
  b, len)
 ...>
 }

------------------------------
@@
char a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a == b
+a, _X_EQ_, b
 )
 ...>
}

@@
int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a == b
+a, _X_EQ_, b
 )
 ...>
}

@@
long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a == b
+a, _X_EQ_, b
 )
 ...>
}

@@
unsigned int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a == b
+a, _X_EQ_, b
 )
 ...>
}

@@
unsigned long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a == b
+a, _X_EQ_, b
 )
 ...>
}

@@
char a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a != b
+a, _X_NEQ_, b
 )
 ...>
}

@@
int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a != b
+a, _X_NEQ_, b
 )
 ...>
}

@@
long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a != b
+a, _X_NEQ_, b
 )
 ...>
}

@@
unsigned int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a != b
+a, _X_NEQ_, b
 )
 ...>
}

@@
unsigned long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a != b
+a, _X_NEQ_, b
 )
 ...>
}

@@
char a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a >= b
+a, _X_GEQ_, b
 )
 ...>
}

@@
int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a >= b
+a, _X_GEQ_, b
 )
 ...>
}

@@
long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a >= b
+a, _X_GEQ_, b
 )
 ...>
}

@@
unsigned int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a >= b
+a, _X_GEQ_, b
 )
 ...>
}

@@
unsigned long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a >= b
+a, _X_GEQ_, b
 )
 ...>
}

@@
char a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a <= b
+a, _X_LEQ_, b
 )
 ...>
}

@@
int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a <= b
+a, _X_LEQ_, b
 )
 ...>
}

@@
long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a <= b
+a, _X_LEQ_, b
 )
 ...>
}

@@
unsigned int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a <= b
+a, _X_LEQ_, b
 )
 ...>
}

@@
unsigned long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a <= b
+a, _X_LEQ_, b
 )
 ...>
}

@@
char a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a > b
+a, _X_GT_, b
 )
 ...>
}

@@
int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a > b
+a, _X_GT_, b
 )
 ...>
}

@@
long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a > b
+a, _X_GT_, b
 )
 ...>
}

@@
unsigned int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a > b
+a, _X_GT_, b
 )
 ...>
}

@@
unsigned long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a > b
+a, _X_GT_, b
 )
 ...>
}

@@
char a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a < b
+a, _X_LT_, b
 )
 ...>
}

@@
int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a < b
+a, _X_LT_, b
 )
 ...>
}

@@
long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_int_op
 (
-a < b
+a, _X_LT_, b
 )
 ...>
}

@@
unsigned int a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a < b
+a, _X_LT_, b
 )
 ...>
}

@@
unsigned long a, b;
identifier func;
@@
 func (...) {
<...
-tt_assert
+tt_uint_op
 (
-a < b
+a, _X_LT_, b
 )
 ...>
}

------------------------------

s/_X_NEQ_/!=/g;
s/_X_NE_/!=/g;
s/_X_EQ_/==/g;
s/_X_GT_/>/g;
s/_X_LT_/</g;
s/_X_GEQ_/>=/g;
s/_X_LEQ_/<=/g;

s/test_mem_op\(/tt_mem_op\(/g;

11 years agoDon't pass invalid memory regions to digestmap_set/get in test_routerlist
Nick Mathewson [Mon, 15 Sep 2014 18:04:19 +0000 (14:04 -0400)] 
Don't pass invalid memory regions to digestmap_set/get in test_routerlist

Fixes bug in c887e20e6a5a2c17c65; bug in no released Tor version.

11 years agoClean up a clangalyzer warning in directory_remove_invalid
Nick Mathewson [Mon, 15 Sep 2014 17:52:56 +0000 (13:52 -0400)] 
Clean up a clangalyzer warning in directory_remove_invalid

"At this point in the code, msg has been set to a string
constant. But the tor code checks that msg is not NULL, and the
redundant NULL check confuses the analyser[...] To avoid this
spurious warning, the patch initialises msg to NULL."

Patch from teor. another part of 13157.

11 years agoClear up another clangalyzer issue
Nick Mathewson [Mon, 15 Sep 2014 17:52:13 +0000 (13:52 -0400)] 
Clear up another clangalyzer issue

"The NULL pointer warnings on the return value of
tor_addr_to_in6_addr32() are incorrect. But clang can't work this
out itself due to limited analysis depth. To teach the analyser that
the return value is safe to dereference, I applied tor_assert to the
return value."

Patch from teor.  Part of 13157.

11 years agofix typo in comment
Roger Dingledine [Sat, 13 Sep 2014 21:10:04 +0000 (17:10 -0400)] 
fix typo in comment

11 years agoMention "make check" in doc/HACKING
Nick Mathewson [Fri, 12 Sep 2014 20:14:49 +0000 (16:14 -0400)] 
Mention "make check" in doc/HACKING

11 years agoGive an example how to run the unit tests
Sebastian Hahn [Fri, 12 Sep 2014 20:08:27 +0000 (22:08 +0200)] 
Give an example how to run the unit tests

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Fri, 12 Sep 2014 01:41:56 +0000 (21:41 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

(Do an "ours" merge to avoid taking version number changes)

11 years agoBump maint-0.2.5 to 0.2.5.7-rc-dev
Nick Mathewson [Fri, 12 Sep 2014 01:38:32 +0000 (21:38 -0400)] 
Bump maint-0.2.5 to 0.2.5.7-rc-dev

11 years agoforward-port changelog from 0.2.5.7-rc
Nick Mathewson [Fri, 12 Sep 2014 01:25:03 +0000 (21:25 -0400)] 
forward-port changelog from 0.2.5.7-rc

11 years agoOne more whitespace fix
Nick Mathewson [Thu, 11 Sep 2014 18:40:19 +0000 (14:40 -0400)] 
One more whitespace fix

11 years agoWhitespace cleanups in test_util
Nick Mathewson [Thu, 11 Sep 2014 18:37:12 +0000 (14:37 -0400)] 
Whitespace cleanups in test_util

11 years agoWhitespace cleanups in transports/test_pt
Nick Mathewson [Thu, 11 Sep 2014 18:36:51 +0000 (14:36 -0400)] 
Whitespace cleanups in transports/test_pt

11 years agoUpdate HACKING instructions to mention format_changelog script
Nick Mathewson [Thu, 11 Sep 2014 15:34:57 +0000 (11:34 -0400)] 
Update HACKING instructions to mention format_changelog script

11 years agoUse tor_malloc_zero() in pt tests
Nick Mathewson [Thu, 11 Sep 2014 13:17:13 +0000 (09:17 -0400)] 
Use tor_malloc_zero() in pt tests

Fixes for PT tests merged with 8402; patch from Yawning.

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

11 years agoMerge remote-tracking branch 'public/bug13104_025'
Nick Mathewson [Thu, 11 Sep 2014 12:30:41 +0000 (08:30 -0400)] 
Merge remote-tracking branch 'public/bug13104_025'

11 years agoFix "comparison is always false" warnings in new test_util_di_ops
Nick Mathewson [Thu, 11 Sep 2014 12:28:46 +0000 (08:28 -0400)] 
Fix "comparison is always false" warnings in new test_util_di_ops

Having a constant zero means that unsigned < 0 is always false.

11 years agoReduce log severity for unused ClientTransportPlugin lines
Roger Dingledine [Thu, 11 Sep 2014 12:02:37 +0000 (08:02 -0400)] 
Reduce log severity for unused ClientTransportPlugin lines

Tor Browser includes several ClientTransportPlugin lines in its
torrc-defaults file, leading every Tor Browser user who looks at her
logs to see these notices and wonder if they're dangerous.

Resolves bug 13124; bugfix on 0.2.5.3-alpha.

11 years agoMerge remote-tracking branch 'public/bug13104_025'
Nick Mathewson [Thu, 11 Sep 2014 04:11:26 +0000 (00:11 -0400)] 
Merge remote-tracking branch 'public/bug13104_025'

11 years agoC90 compliance for #13104 fixes
Nick Mathewson [Thu, 11 Sep 2014 04:10:53 +0000 (00:10 -0400)] 
C90 compliance for #13104 fixes

11 years agoAdd a changes file for bug 13104
Nick Mathewson [Thu, 11 Sep 2014 04:05:56 +0000 (00:05 -0400)] 
Add a changes file for bug 13104

11 years agoAvoid an overflow on negation in format_helper_exit_status
Nick Mathewson [Thu, 11 Sep 2014 04:00:13 +0000 (00:00 -0400)] 
Avoid an overflow on negation in format_helper_exit_status

Part of 13104; patch from teor.

11 years agoAvoid divide by zero and NaNs in scale_array_elements_to_u64
Nick Mathewson [Thu, 11 Sep 2014 03:59:21 +0000 (23:59 -0400)] 
Avoid divide by zero and NaNs in scale_array_elements_to_u64

Patch from teor; part of 13104

11 years agoExtra tests for tor_memeq and memcmp
Nick Mathewson [Thu, 11 Sep 2014 03:58:02 +0000 (23:58 -0400)] 
Extra tests for tor_memeq and memcmp

(Patch from teor; part of 13104)

11 years agoAvoid overflows and underflows in sscanf and friends
Nick Mathewson [Thu, 11 Sep 2014 03:57:31 +0000 (23:57 -0400)] 
Avoid overflows and underflows in sscanf and friends

(Patch from teor on 13104)

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

11 years agoIn routerlist_assert_ok(), check r2 before taking &(r2->cache_info)
Nick Mathewson [Thu, 11 Sep 2014 03:46:20 +0000 (23:46 -0400)] 
In routerlist_assert_ok(), check r2 before taking &(r2->cache_info)

Technically, we're not allowed to take the address of a member can't
exist relative to the null pointer.  That makes me wonder how any sane
compliant system implements the offsetof macro, but let's let sleeping
balrogs lie.

Fixes 13096; patch on 0.1.1.9-alpha; patch from "teor", who was using
clang -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv

11 years agoMerge remote-tracking branch 'yawning/bug_8402'
Nick Mathewson [Thu, 11 Sep 2014 03:41:55 +0000 (23:41 -0400)] 
Merge remote-tracking branch 'yawning/bug_8402'

11 years agoMerge remote-tracking branch 'public/torrc_minimal'
Nick Mathewson [Thu, 11 Sep 2014 03:36:27 +0000 (23:36 -0400)] 
Merge remote-tracking branch 'public/torrc_minimal'

11 years agoMerge remote-tracking branch 'public/bug12908_025' into maint-0.2.5
Nick Mathewson [Thu, 11 Sep 2014 02:12:47 +0000 (22:12 -0400)] 
Merge remote-tracking branch 'public/bug12908_025' into maint-0.2.5

11 years agoMark StrictE{ntry,xit}Nodes as obsolete.
Nick Mathewson [Mon, 18 Aug 2014 17:03:21 +0000 (13:03 -0400)] 
Mark StrictE{ntry,xit}Nodes as obsolete.

11 years agoFix issues brought up in nickm's review.
Yawning Angel [Tue, 9 Sep 2014 18:21:19 +0000 (18:21 +0000)] 
Fix issues brought up in nickm's review.

 * Update pt_get_proxy_uri() documentation.
 * proxy_supported is now unsigned.
 * Added a changes file.

11 years agoAdd unittests for finding the third quartile of a set.
George Kadianakis [Thu, 24 Jul 2014 11:31:49 +0000 (14:31 +0300)] 
Add unittests for finding the third quartile of a set.

11 years agoMerge remote-tracking branch 'asn/bug13064'
Nick Mathewson [Tue, 9 Sep 2014 16:26:16 +0000 (12:26 -0400)] 
Merge remote-tracking branch 'asn/bug13064'

11 years agoRemove now-pointless SIZE_MAX stanza from OpenBSD_malloc_linux
Nick Mathewson [Tue, 9 Sep 2014 16:09:18 +0000 (12:09 -0400)] 
Remove now-pointless SIZE_MAX stanza from OpenBSD_malloc_linux

11 years agoUse S?SIZE_MAX, not S?SIZE_T_MAX
Nick Mathewson [Tue, 9 Sep 2014 16:08:03 +0000 (12:08 -0400)] 
Use S?SIZE_MAX, not S?SIZE_T_MAX

This fixes bug 13102 (not on any released Tor) where using the
standard SSIZE_MAX name broke mingw64, and we didn't realize.

I did this with
   perl -i -pe 's/SIZE_T_MAX/SIZE_MAX/' src/*/*.[ch] src/*/*/*.[ch]

11 years agoRemove client-side bad directory logic
Sebastian Hahn [Thu, 4 Sep 2014 23:49:47 +0000 (01:49 +0200)] 
Remove client-side bad directory logic

Implements the second half of #13060.

11 years agoRemove dirauth support for the BadDirectory flag
Sebastian Hahn [Thu, 4 Sep 2014 23:37:25 +0000 (01:37 +0200)] 
Remove dirauth support for the BadDirectory flag

Implements the first half of #13060. The second half will be to remove
client support, too.

11 years agoMerge branch 'bug12899_squashed'
Nick Mathewson [Tue, 9 Sep 2014 15:51:18 +0000 (11:51 -0400)] 
Merge branch 'bug12899_squashed'

11 years agoRemove support for naming directory authorities
Sebastian Hahn [Thu, 4 Sep 2014 21:16:51 +0000 (23:16 +0200)] 
Remove support for naming directory authorities

This implements the meat of #12899. This commit should simply remove the
parts of Tor dirauths used to check whether a relay was supposed to be
named or not, it doesn't yet convert to a new mechanism for
reject/invalid/baddir/badexiting relays.

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Tue, 9 Sep 2014 15:05:28 +0000 (11:05 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoMerge remote-tracking branch 'andrea/bug12160_025' into maint-0.2.5
Nick Mathewson [Tue, 9 Sep 2014 15:04:54 +0000 (11:04 -0400)] 
Merge remote-tracking branch 'andrea/bug12160_025' into maint-0.2.5

11 years agoMerge remote-tracking branch 'origin/maint-0.2.5'
Nick Mathewson [Tue, 9 Sep 2014 14:57:09 +0000 (10:57 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.5'

11 years agoMerge remote-tracking branch 'public/bug12700_024' into maint-0.2.5
Nick Mathewson [Tue, 9 Sep 2014 14:51:39 +0000 (10:51 -0400)] 
Merge remote-tracking branch 'public/bug12700_024' into maint-0.2.5