]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
12 years agoMerge remote-tracking branch 'public/bug8059' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 18:31:50 +0000 (14:31 -0400)] 
Merge remote-tracking branch 'public/bug8059' into maint-0.2.4

12 years agoRemove an unused local variable.
Nick Mathewson [Mon, 18 Mar 2013 18:30:11 +0000 (14:30 -0400)] 
Remove an unused local variable.

12 years agoMerge branch 'bug8206_squashed' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 18:29:12 +0000 (14:29 -0400)] 
Merge branch 'bug8206_squashed' into maint-0.2.4

12 years agoCheck return values from fcntl and setsockopt
Nick Mathewson [Tue, 12 Mar 2013 00:58:28 +0000 (20:58 -0400)] 
Check return values from fcntl and setsockopt

(Based on a patch from flupzor; bug #8206)

12 years agoCheck for 0.2.4.8, not 0.2.4.7, to determine EXTEND2 support
Nick Mathewson [Wed, 13 Mar 2013 16:47:48 +0000 (12:47 -0400)] 
Check for 0.2.4.8, not 0.2.4.7, to determine EXTEND2 support

Fixes bug 8464; bugfix on b2863739 in 0.2.4.8-alpha

12 years agoMerge remote-tracking branch 'public/bug8180_023_v2' into maint-0.2.4
Nick Mathewson [Fri, 15 Mar 2013 16:38:11 +0000 (12:38 -0400)] 
Merge remote-tracking branch 'public/bug8180_023_v2' into maint-0.2.4

12 years agoUpgrade the warn for EntryNodes without UseEntryGuards to an error
Nick Mathewson [Fri, 15 Mar 2013 14:42:17 +0000 (10:42 -0400)] 
Upgrade the warn for EntryNodes without UseEntryGuards to an error

fixes bug 8180

12 years agoMerge remote-tracking branch 'public/unused_stuff' into maint-0.2.4
Nick Mathewson [Fri, 15 Mar 2013 16:17:23 +0000 (12:17 -0400)] 
Merge remote-tracking branch 'public/unused_stuff' into maint-0.2.4

12 years agoFix some basic socket issues with tor-fw-helper-natpmp on windows
Nick Mathewson [Fri, 15 Mar 2013 16:11:38 +0000 (12:11 -0400)] 
Fix some basic socket issues with tor-fw-helper-natpmp on windows

This isn't going to be the last of these issues, but we might as
well take the fixes as we find them.

Patch from Gisle Vanem, fixes bug 7280.

12 years agoRemove incentives.txt from tor git; putting it into torspec.
Nick Mathewson [Fri, 15 Mar 2013 15:25:45 +0000 (11:25 -0400)] 
Remove incentives.txt from tor git; putting it into torspec.

12 years agoFix brackets in tor-fw-helper help output.
David Fifield [Thu, 20 Dec 2012 20:40:50 +0000 (12:40 -0800)] 
Fix brackets in tor-fw-helper help output.

Change nesting from [(]) to [()]. Formerly it made it look to me at
first glance that "internal port" was optional.

      [Trivial change; fixes #7767  --nickm]

12 years agoImprove asciidoc-helper's suggestion of what to install
Nick Mathewson [Fri, 15 Mar 2013 15:17:08 +0000 (11:17 -0400)] 
Improve asciidoc-helper's suggestion of what to install

Fixes bug #7766.

Patch by David Fifield, revised by Peter Palfrader.

12 years agoBe explicit that we want not only nacl but nacl-with-a-fast-curve25519
Nick Mathewson [Fri, 15 Mar 2013 14:48:33 +0000 (10:48 -0400)] 
Be explicit that we want not only nacl but nacl-with-a-fast-curve25519

Resolves the user experience part of #8014.

12 years agoMake circuit_purpose_to_string handle CIRCUIT_PURPOSE_PATH_BIAS_TESTING
Nick Mathewson [Thu, 14 Mar 2013 16:06:03 +0000 (12:06 -0400)] 
Make circuit_purpose_to_string handle CIRCUIT_PURPOSE_PATH_BIAS_TESTING

12 years agoLook at the right variable when warning about signed size_t.
Nick Mathewson [Mon, 11 Mar 2013 20:29:06 +0000 (16:29 -0400)] 
Look at the right variable when warning about signed size_t.

In 81d69f4c2d8a451 (0.2.21-alpha) we added a compile-time check for
a (totally broken) signed size_t.  In 0e597471af (not yet released)
I switched to a better configure-time check, which stored its output
in a different variable.  I didn't change the code which looked at
the output, however.

This bug is not in any released version of Tor, and would not affect
anybody with a working Tor.

12 years agoMerge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
Nick Mathewson [Mon, 11 Mar 2013 17:32:16 +0000 (13:32 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4

12 years agoMerge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3
Nick Mathewson [Mon, 11 Mar 2013 17:32:01 +0000 (13:32 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3

12 years agoFix a framing bug when reading versions from a versions cell.
Nick Mathewson [Mon, 11 Mar 2013 16:29:28 +0000 (12:29 -0400)] 
Fix a framing bug when reading versions from a versions cell.

Our ++ should have been += 2.  This means that we'd accept version
numbers even when they started at an odd position.

This bug should be harmless in practice for so long as every version
number we allow begins with a 0 byte, but if we ever have a version
number starting with 1, 2, 3, or 4, there will be trouble here.

Fix for bug 8059, reported pseudonymously. Bugfix on 0.2.0.10-alpha
-- specifically, commit 6fcda529, where during development I
increased the width of a version to 16 bits without changing the
loop step.

12 years agostart part-way through the ssl cert lifetime
Roger Dingledine [Sun, 10 Mar 2013 20:28:28 +0000 (16:28 -0400)] 
start part-way through the ssl cert lifetime

also, snap the start time and end time to a day boundary, since most
certs in the wild seem to do this.

12 years agorandomize SSLKeyLifetime by default
Roger Dingledine [Sat, 9 Mar 2013 22:16:11 +0000 (17:16 -0500)] 
randomize SSLKeyLifetime by default

resolves ticket 8443.

12 years agoparameterize SSLKeyLifetime
Roger Dingledine [Sat, 9 Mar 2013 21:42:35 +0000 (16:42 -0500)] 
parameterize SSLKeyLifetime

no actual changes in behavior yet

12 years agoMerge remote-tracking branch 'arma/bug6783_big_hammer' into maint-0.2.4
Nick Mathewson [Mon, 11 Mar 2013 03:01:58 +0000 (23:01 -0400)] 
Merge remote-tracking branch 'arma/bug6783_big_hammer' into maint-0.2.4

12 years agoFix typos in a few log messages
Benjamin Kerensa [Mon, 11 Mar 2013 01:45:23 +0000 (18:45 -0700)] 
Fix typos in a few log messages

12 years agoset DisableV2DirectoryInfo_ off by default
Roger Dingledine [Mon, 11 Mar 2013 00:40:15 +0000 (20:40 -0400)] 
set DisableV2DirectoryInfo_ off by default

since it's only enableable by authorities, nobody else would be able
to start their tor

12 years agoTweak bug6783 patch.
Nick Mathewson [Wed, 6 Mar 2013 20:19:04 +0000 (15:19 -0500)] 
Tweak bug6783 patch.

12 years agoAdd a DisableV2DirectoryInfo_ option to 404 all v2 ns requests
Nick Mathewson [Wed, 28 Nov 2012 16:09:37 +0000 (11:09 -0500)] 
Add a DisableV2DirectoryInfo_ option to 404 all v2 ns requests

I have no idea whether b0rken clients will DoS the network if the v2
authorities all turn this on or not.  It's experimental. See #6783 for
a description of how to test it more or less safely, and please be
careful!

12 years agoMerge branch 'bug8447_squashed' into maint-0.2.4
Nick Mathewson [Sun, 10 Mar 2013 23:52:43 +0000 (19:52 -0400)] 
Merge branch 'bug8447_squashed' into maint-0.2.4

12 years agoFix 8447: use %u to format circid_t.
Nick Mathewson [Sun, 10 Mar 2013 12:32:58 +0000 (08:32 -0400)] 
Fix 8447: use %u to format circid_t.

Now that circid_t is 4 bytes long, the default integer promotions will
leave it alone when sizeof(int) == 4, which will leave us formatting an
unsigned as an int.  That's technically undefined behavior.

Fixes bug 8447 on bfffc1f0fc7616a25c32da2eb759dade4651659e.  Bug not
in any released Tor.

12 years agoUpdate to the March 2013 GeoIP database.
Karsten Loesing [Thu, 7 Mar 2013 19:58:31 +0000 (20:58 +0100)] 
Update to the March 2013 GeoIP database.

12 years agoCorrectly set entry->is_dir_cache when adding an entry guard for the first time
Andrea Shepard [Fri, 1 Mar 2013 09:59:25 +0000 (01:59 -0800)] 
Correctly set entry->is_dir_cache when adding an entry guard for the first time

                    (Second part of a bug8367 fix. -NM)

12 years agoFix bootstrapping with bridges by making is_dir_cache is set on them.
Nick Mathewson [Thu, 28 Feb 2013 22:20:46 +0000 (17:20 -0500)] 
Fix bootstrapping with bridges by making is_dir_cache is set on them.

This fixes bug 8367, introduced in d7089ff228227259137b5a8b. Not in
any released Tor.

12 years agoupdate the in-progress bandwidth requirements for authorities
Roger Dingledine [Mon, 25 Feb 2013 14:19:04 +0000 (09:19 -0500)] 
update the in-progress bandwidth requirements for authorities

12 years agoFix a comment in tor_main.c
Nick Mathewson [Mon, 25 Feb 2013 08:24:53 +0000 (03:24 -0500)] 
Fix a comment in tor_main.c

We don't use subversion or src/*/makefile.am any longer

12 years agoRemove some functions which were unused except for their tests
Nick Mathewson [Sun, 24 Feb 2013 04:38:43 +0000 (23:38 -0500)] 
Remove some functions which were unused except for their tests

12 years agoRemove some totally unused functions
Nick Mathewson [Sun, 24 Feb 2013 04:31:31 +0000 (23:31 -0500)] 
Remove some totally unused functions

12 years agoRemove a bunch of unused macro definitions
Nick Mathewson [Sun, 24 Feb 2013 04:03:24 +0000 (23:03 -0500)] 
Remove a bunch of unused macro definitions

12 years agofix a wide line
Nick Mathewson [Tue, 19 Feb 2013 20:08:54 +0000 (15:08 -0500)] 
fix a wide line

12 years agoMerge branch 'bug8065_v2'
Nick Mathewson [Tue, 19 Feb 2013 20:02:22 +0000 (15:02 -0500)] 
Merge branch 'bug8065_v2'

12 years agoDowngrade an assert to LD_BUG
Nick Mathewson [Tue, 19 Feb 2013 19:38:04 +0000 (14:38 -0500)] 
Downgrade an assert to LD_BUG

This should prevent crashes on further recurrence of 8065, and help
diagnose such if they occur

12 years agoFix a may-be-used-uninitialized warning.
Nick Mathewson [Tue, 19 Feb 2013 20:00:08 +0000 (15:00 -0500)] 
Fix a may-be-used-uninitialized warning.

12 years agoMerge branch 'bug2286_unit_test_squashed'
Nick Mathewson [Tue, 19 Feb 2013 19:54:05 +0000 (14:54 -0500)] 
Merge branch 'bug2286_unit_test_squashed'

12 years agoTest alternate values of maxunmeasuredbw too
Andrea Shepard [Tue, 19 Feb 2013 16:58:09 +0000 (08:58 -0800)] 
Test alternate values of maxunmeasuredbw too

12 years agoUpdate unmeasured bandwidth clipping unit test per NickM's bugfix for the Unmeasured...
Andrea Shepard [Tue, 19 Feb 2013 15:57:49 +0000 (07:57 -0800)] 
Update unmeasured bandwidth clipping unit test per NickM's bugfix for the Unmeasured=1 issue

12 years agoRefactor storing of measured_bw versus Unmeasured=1.
Nick Mathewson [Tue, 19 Feb 2013 15:39:27 +0000 (10:39 -0500)] 
Refactor storing of measured_bw versus Unmeasured=1.

This patch moves the measured_bw field and the has_measured_bw field
into vote_routerstatus_t, since only votes have 'Measured=XX' set on
their weight line.

I also added a new bw_is_unmeasured flag to routerstatus_t to
represent the Unmeasured=1 flag on a w line.  Previously, I was using
has_measured_bw for this, which was quite incorrect: has_measured_bw
means that the measured_bw field is set, and it's probably a mistake
to have it serve double duty as meaning that 'baandwidth' represents a
measured value.

While making this change,I also found a harmless but stupid bug in
dirserv_read_measured_bandwidths: It assumes that it's getting a
smartlist of routerstatus_t, when really it's getting a smartlist of
vote_routerstatus_t.  C's struct layout rules mean that we could never
actually get an error because of that, but it's still quite incorrect.
I fixed that, and in the process needed to add two more sorting and
searching helpers.

Finally, I made the Unmeasured=1 flag get parsed.  We don't use it for
anything yet, but someday we might.

This isn't complete yet -- the new 2286 unit test doesn't build.

12 years agoAdd unit test for unmeasured bandwidth clipping in consensus
Andrea Shepard [Tue, 19 Feb 2013 14:20:29 +0000 (06:20 -0800)] 
Add unit test for unmeasured bandwidth clipping in consensus

12 years agoRefactor v3_networkstatus test to allow reuse of test for measuredbw
Andrea Shepard [Fri, 15 Feb 2013 08:28:04 +0000 (00:28 -0800)] 
Refactor v3_networkstatus test to allow reuse of test for measuredbw

12 years agoNote some annoyinc copy-and-paste code
Nick Mathewson [Tue, 22 May 2012 13:51:02 +0000 (09:51 -0400)] 
Note some annoyinc copy-and-paste code

12 years agoTweak consensus method 17 based on arma's comments
Nick Mathewson [Tue, 22 May 2012 13:48:10 +0000 (09:48 -0400)] 
Tweak consensus method 17 based on arma's comments

Instead of capping whenever a router has fewer than 3 measurements,
we cap whenever a router has fewer than 3 measurements *AND* there
are at least 3 authorities publishing measured bandwidths.

We also generate bandwidth lines with a new "Unmeasured=1" flag,
meaning that we didn't have enough observations for a node to use
measured bandwidth values in the authority's input, whether we capped
it or not.

12 years agotouchups on 78582760
Roger Dingledine [Tue, 19 Feb 2013 09:07:36 +0000 (04:07 -0500)] 
touchups on 78582760

12 years agoDocument (on man page) which DNS record types Tor knows.
Nick Mathewson [Tue, 19 Feb 2013 07:47:44 +0000 (02:47 -0500)] 
Document (on man page) which DNS record types Tor knows.

Fixes bug 7876

12 years agoRevise some comments in router.c
Nick Mathewson [Tue, 19 Feb 2013 07:43:36 +0000 (02:43 -0500)] 
Revise some comments in router.c

Avoid the phrase "legally valid" (as opposed to valid but not legal)?
And document what functions really do.

Fix for bug 6935.

12 years agoFix a bug that roger found in the wide_circ_id code
Nick Mathewson [Fri, 15 Feb 2013 23:20:46 +0000 (18:20 -0500)] 
Fix a bug that roger found in the wide_circ_id code

12 years agoMerge remote-tracking branch 'public/bug8209'
Nick Mathewson [Fri, 15 Feb 2013 21:37:53 +0000 (16:37 -0500)] 
Merge remote-tracking branch 'public/bug8209'

12 years agoMerge remote-tracking branch 'public/bug8207'
Nick Mathewson [Fri, 15 Feb 2013 21:29:43 +0000 (16:29 -0500)] 
Merge remote-tracking branch 'public/bug8207'

12 years agoMerge remote-tracking branch 'public/wide_circ_ids'
Nick Mathewson [Fri, 15 Feb 2013 21:23:43 +0000 (16:23 -0500)] 
Merge remote-tracking branch 'public/wide_circ_ids'

Conflicts:
src/or/channel.h
src/or/connection_or.c
src/or/cpuworker.c

12 years agomake check-spaces
Nick Mathewson [Fri, 15 Feb 2013 21:02:57 +0000 (16:02 -0500)] 
make check-spaces

12 years agoMerge remote-tracking branch 'public/feature4994-rebased'
Nick Mathewson [Fri, 15 Feb 2013 20:58:54 +0000 (15:58 -0500)] 
Merge remote-tracking branch 'public/feature4994-rebased'

12 years agoFix unreachable use-before-assign in test_util_join_win_cmdline
Nick Mathewson [Fri, 15 Feb 2013 20:57:15 +0000 (15:57 -0500)] 
Fix unreachable use-before-assign in test_util_join_win_cmdline

Apparently there is a compiler that believes this is something to
warn about.

12 years agoMerge remote-tracking branch 'public/integers_donna'
Nick Mathewson [Fri, 15 Feb 2013 20:55:36 +0000 (15:55 -0500)] 
Merge remote-tracking branch 'public/integers_donna'

12 years agoAuthorities were adding downtime for every relay every restart
Roger Dingledine [Tue, 12 Feb 2013 22:18:51 +0000 (17:18 -0500)] 
Authorities were adding downtime for every relay every restart

Stop marking every relay as having been down for one hour every
time we restart a directory authority. These artificial downtimes
were messing with our Stable and Guard flag calculations.

Fixes bug 8218 (introduced by the fix for 1035). Bugfix on 0.2.2.23-alpha.

12 years agoUse torint.h in curve25519-donna*.c
Nick Mathewson [Thu, 14 Feb 2013 20:34:38 +0000 (15:34 -0500)] 
Use torint.h in curve25519-donna*.c

This will get it building on systems that lack stdint.h

12 years agoMerge remote-tracking branch 'arma/bug1992'
Nick Mathewson [Thu, 14 Feb 2013 19:55:49 +0000 (14:55 -0500)] 
Merge remote-tracking branch 'arma/bug1992'

12 years agoRestore the entry/dirguard distinction.
Nick Mathewson [Tue, 12 Feb 2013 21:23:12 +0000 (16:23 -0500)] 
Restore the entry/dirguard distinction.

We shouldn't be calling choose_random_entry() for directory
conncetions; that's what choose_random_dirguard() is for.

12 years agotor.1: Specify what Auto means for RefuseUnknownExits in more detail
Peter Palfrader [Tue, 12 Feb 2013 20:20:12 +0000 (21:20 +0100)] 
tor.1: Specify what Auto means for RefuseUnknownExits in more detail

12 years agoMerge remote-tracking branch 'origin/maint-0.2.3'
Nick Mathewson [Tue, 12 Feb 2013 15:51:54 +0000 (10:51 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.3'

12 years agooops; add a missing semicolon
Nick Mathewson [Mon, 11 Feb 2013 21:17:33 +0000 (16:17 -0500)] 
oops; add a missing semicolon

(Cherry-picked from fc35ee4910326dc1ae718482b30e57666a71df85)

12 years agoget rid of the new caching notion in resolve_my_address()
Roger Dingledine [Tue, 12 Feb 2013 09:25:42 +0000 (04:25 -0500)] 
get rid of the new caching notion in resolve_my_address()

and replace it with the good old-fashioned two functions approach

12 years agosimplify timing checks
Roger Dingledine [Tue, 12 Feb 2013 03:07:19 +0000 (22:07 -0500)] 
simplify timing checks

now that both timers are on the same schedule, there's no point
tracking separate timers.

12 years agoCheck for IP address change every minute, not 15 minutes
Roger Dingledine [Tue, 12 Feb 2013 02:57:32 +0000 (21:57 -0500)] 
Check for IP address change every minute, not 15 minutes

Relays used to check every 10 to 60 seconds, as an accidental side effect
of calling directory_fetches_from_authorities() when considering doing
a directory fetch. The fix for bug 1992 removes that side effect. At the
same time, bridge relays never had the side effect, leading to confused
bridge operators who tried crazy tricks to get their bridges to notice
IP address changes (see ticket 1913).

The new behavior is to reinstate an every-60-seconds check for both
public relays and bridge relays, now that the side effect is gone.

12 years agoStop trying to resolve our hostname so often
Roger Dingledine [Tue, 12 Feb 2013 02:48:18 +0000 (21:48 -0500)] 
Stop trying to resolve our hostname so often

For example, we were doing a resolve every time we think about doing a
directory fetch. Now we reuse the cached answer in some cases.

Fixes bugs 1992 (bugfix on 0.2.0.20-rc) and 2410 (bugfix on
0.1.2.2-alpha).

12 years agoDon't tor_close_socket(-1) in tor-resolve.
Nick Mathewson [Mon, 11 Feb 2013 22:32:58 +0000 (17:32 -0500)] 
Don't tor_close_socket(-1) in tor-resolve.

Bugfix on 96b1bd4fb8e64.  Not in any released Tor.

12 years agoTeach resolve_my_address() to return a cached answer
Roger Dingledine [Mon, 11 Feb 2013 22:09:10 +0000 (17:09 -0500)] 
Teach resolve_my_address() to return a cached answer

I didn't make any of the callers use this feature yet.

12 years agoFix two more coverity-spotted leaks in master.
Nick Mathewson [Mon, 11 Feb 2013 22:01:02 +0000 (17:01 -0500)] 
Fix two more coverity-spotted leaks in master.

One is a probably-impossible leak if we fail to sign a consensus;
another occurs when we can't look up the user we're trying to chown
our sockets to.

12 years agoAvoid null-pointer deref in pathbias_is_new_circ_attempt
Nick Mathewson [Mon, 11 Feb 2013 21:59:21 +0000 (16:59 -0500)] 
Avoid null-pointer deref in pathbias_is_new_circ_attempt

Coverity is worried about this (CID 980653).  It hasn't happened in
testing, but we might as well make sure it can't happen.

12 years agoFix a nigh-impossible overflow in cpuworker.c
Nick Mathewson [Mon, 11 Feb 2013 21:40:48 +0000 (16:40 -0500)] 
Fix a nigh-impossible overflow in cpuworker.c

When we compute the estimated microseconds we need to handle our
pending onionskins, we could (in principle) overflow a uint32_t if
we ever had 4 million pending onionskins before we had any data
about how onionskins take.  Nevertheless, let's compute it properly.

Fixes bug 8210; bugfix on 0.2.4.10. Found by coverity; this is CID
980651.

12 years agoFix a null-deref-on-fail in unit tests
Nick Mathewson [Mon, 11 Feb 2013 21:32:13 +0000 (16:32 -0500)] 
Fix a null-deref-on-fail in unit tests

If geoip_format_bridge_stats() returned NULL when it should have
returned a string, we would have tried to deref NULL, and died.  Not
a big deal in the unit tests, but still worth fixing.

Found by coverity; This is CID 743384.

12 years agoMake _SC_OPEN_MAX actually get used when closing fds before exec.
Nick Mathewson [Mon, 11 Feb 2013 21:27:35 +0000 (16:27 -0500)] 
Make _SC_OPEN_MAX actually get used when closing fds before exec.

Fixes bug 8209; bugfix on 0.2.3.1-alpha.

12 years agooops; add a missing semicolon
Nick Mathewson [Mon, 11 Feb 2013 21:17:33 +0000 (16:17 -0500)] 
oops; add a missing semicolon

12 years agoMerge remote-tracking branch 'public/bug7816_023'
Nick Mathewson [Mon, 11 Feb 2013 21:14:17 +0000 (16:14 -0500)] 
Merge remote-tracking branch 'public/bug7816_023'

12 years agoFix another memory leak
Nick Mathewson [Mon, 11 Feb 2013 21:12:49 +0000 (16:12 -0500)] 
Fix another memory leak

This one occurs when changing configuration options. Found by
coverity.

12 years agoMerge remote-tracking branch 'public/bug8208'
Nick Mathewson [Mon, 11 Feb 2013 21:06:02 +0000 (16:06 -0500)] 
Merge remote-tracking branch 'public/bug8208'

12 years agoCheck whether ei is non-NULL before altering it.
Nick Mathewson [Mon, 11 Feb 2013 21:05:03 +0000 (16:05 -0500)] 
Check whether ei is non-NULL before altering it.

This fixes a crash bug if we fail to generate an extrainfo
descriptor.

Fixes bug 8208; bugfix on 0.2.3.16-alpha.

12 years agoSuppress a coverity false positive in connection_edge_package_raw_inbuf
Nick Mathewson [Mon, 11 Feb 2013 20:55:50 +0000 (15:55 -0500)] 
Suppress a coverity false positive in connection_edge_package_raw_inbuf

Coverity is worried that we're checking entry_conn in some cases,
but not in the case where we set entry_conn->pending_optimistic_data.

This commit should calm it down (CID 718623).

12 years agoMake hidden service authorization work again.
Nick Mathewson [Mon, 11 Feb 2013 20:42:57 +0000 (15:42 -0500)] 
Make hidden service authorization work again.

The refactoring in commit 471ab340325 wasn't complete enough: we
were checking the auth_len variable, but never actually setting it,
so it would never seem that authentication had been provided.

This commit also removes a bunch of unused variables from
rend_service_introduce, whose unusedness we hadn't noticed because
we were wiping them at the end of the function.

Fix for bug 8207; bugfix on 0.2.4.1-alpha.

12 years agoFix even more dead code and resource leaks in the unit tests
Nick Mathewson [Mon, 11 Feb 2013 20:20:20 +0000 (15:20 -0500)] 
Fix even more dead code and resource leaks in the unit tests

Found by coverity

12 years agoFix a very short-lived socket leak in tor-resolve
Nick Mathewson [Mon, 11 Feb 2013 20:13:42 +0000 (15:13 -0500)] 
Fix a very short-lived socket leak in tor-resolve

This shouldn't actually matter, since tor-resolve will return soon
after this function exits, but it's nice to be warning-free

Found by coverity, fixes CID 718633

12 years agoResolve memory leaks in the unit tests and benchmarks (found by coverity)
Nick Mathewson [Mon, 11 Feb 2013 19:57:10 +0000 (14:57 -0500)] 
Resolve memory leaks in the unit tests and benchmarks (found by coverity)

These shouldn't really matter, but it's nice to be leak-free.

12 years agoFix a copy-and-paste issue found by coverity
Nick Mathewson [Mon, 11 Feb 2013 19:42:33 +0000 (14:42 -0500)] 
Fix a copy-and-paste issue found by coverity

Fixes CID 980650; bugfix on 0.2.4.10-alpha.

12 years agoSpeed up the curve25519 unit test by doing fewer iterations
Nick Mathewson [Mon, 11 Feb 2013 18:55:42 +0000 (13:55 -0500)] 
Speed up the curve25519 unit test by doing fewer iterations

This test was accounting for about 2/3 of our unit tests' runtime,
even on systems with a fast curve25519.  No test should take so long.

12 years agoMerge remote-tracking branch 'public/bug8158'
Nick Mathewson [Mon, 11 Feb 2013 18:32:38 +0000 (13:32 -0500)] 
Merge remote-tracking branch 'public/bug8158'

12 years agoAvoid generating extra spaces when explaining how we guessed our address
Nick Mathewson [Mon, 11 Feb 2013 18:05:27 +0000 (13:05 -0500)] 
Avoid generating extra spaces when explaining how we guessed our address

12 years agoRefactor resolve_my_address() so logs are more accurate / helpful
Roger Dingledine [Sun, 10 Feb 2013 21:45:48 +0000 (16:45 -0500)] 
Refactor resolve_my_address() so logs are more accurate / helpful

It returns the method by which we decided our public IP address
(explicitly configured, resolved from explicit hostname, guessed from
interfaces, learned by gethostname).

Now we can provide more helpful log messages when a relay guesses its IP
address incorrectly (e.g. due to unexpected lines in /etc/hosts). Resolves
ticket 2267.

While we're at it, stop sending a stray "(null)" in some cases for the
server status "EXTERNAL_ADDRESS" controller event. Resolves bug 8200.

12 years agolog the hostname that resolve_my_address() used to guess our IP
Roger Dingledine [Mon, 2 Apr 2012 23:57:27 +0000 (19:57 -0400)] 
log the hostname that resolve_my_address() used to guess our IP

12 years agoMerge remote-tracking branch 'public/bug7801_v2'
Nick Mathewson [Mon, 11 Feb 2013 16:28:08 +0000 (11:28 -0500)] 
Merge remote-tracking branch 'public/bug7801_v2'

12 years agoReplace magic constants for wide_circ_ids with inline function calls
Nick Mathewson [Sat, 9 Feb 2013 05:56:53 +0000 (00:56 -0500)] 
Replace magic constants for wide_circ_ids with inline function calls

12 years agoWrap more macro definitions in (parentheses)
Nick Mathewson [Sat, 9 Feb 2013 05:14:45 +0000 (00:14 -0500)] 
Wrap more macro definitions in (parentheses)

To avoid surprises, good coding practice suggests parenthesizing every
macro definition -- or at the very least, all those involving an
expression.

12 years agoImprove comment at Andrea's request
Nick Mathewson [Fri, 8 Feb 2013 22:13:11 +0000 (17:13 -0500)] 
Improve comment at Andrea's request

12 years agoMerge remote-tracking branch 'public/signof_enum'
Nick Mathewson [Fri, 8 Feb 2013 21:48:50 +0000 (16:48 -0500)] 
Merge remote-tracking branch 'public/signof_enum'

12 years agochanges file for bug7801
Nick Mathewson [Fri, 8 Feb 2013 21:46:50 +0000 (16:46 -0500)] 
changes file for bug7801

12 years agoUnit test for tor_weak_random_range
Nick Mathewson [Fri, 8 Feb 2013 21:46:35 +0000 (16:46 -0500)] 
Unit test for tor_weak_random_range