]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
12 years agoDon't assert when writing a cell to a CLOSING connection.
Nick Mathewson [Tue, 19 Mar 2013 20:35:40 +0000 (16:35 -0400)] 
Don't assert when writing a cell to a CLOSING connection.

Instead, drop the cell.

Fixes another case of bug 7350; bugfix on 0.2.4.4-alpha

12 years agoMerge remote-tracking branch 'public/bug7164_diagnostic' into maint-0.2.4
Nick Mathewson [Tue, 19 Mar 2013 20:16:48 +0000 (16:16 -0400)] 
Merge remote-tracking branch 'public/bug7164_diagnostic' into maint-0.2.4

12 years agoMerge branch 'bug8240_v2_squashed' into maint-0.2.4
Nick Mathewson [Tue, 19 Mar 2013 20:15:27 +0000 (16:15 -0400)] 
Merge branch 'bug8240_v2_squashed' into maint-0.2.4

Conflicts:
doc/tor.1.txt
src/or/circuitbuild.c
src/or/config.c
src/or/or.h

12 years agoDrop the minimum guard lifetime back down to one month
Nick Mathewson [Tue, 12 Mar 2013 02:16:25 +0000 (22:16 -0400)] 
Drop the minimum guard lifetime back down to one month

Mike believes that raising the default to 2 months with no way to lower
it may create horrible load-balancing issues.

12 years agoAdd support for days of the week to intervals
Nick Mathewson [Tue, 12 Mar 2013 01:35:50 +0000 (21:35 -0400)] 
Add support for days of the week to intervals

12 years agoDocument the GuardLifetime option
Nick Mathewson [Tue, 12 Mar 2013 01:25:37 +0000 (21:25 -0400)] 
Document the GuardLifetime option

12 years agoMake the guard lifetime configurable and adjustable via the consensus
Nick Mathewson [Fri, 15 Feb 2013 22:24:13 +0000 (17:24 -0500)] 
Make the guard lifetime configurable and adjustable via the consensus

Fixes 8240.

(Don't actually increase the default guard lifetime. It seems likely to
break too many things if done precipitiously.)

12 years agoMerge remote-tracking branch 'public/bug7950' into maint-0.2.4
Nick Mathewson [Tue, 19 Mar 2013 19:32:17 +0000 (15:32 -0400)] 
Merge remote-tracking branch 'public/bug7950' into maint-0.2.4

12 years agoMerge remote-tracking branch 'public/bug7768' into maint-0.2.4
Nick Mathewson [Tue, 19 Mar 2013 19:11:47 +0000 (15:11 -0400)] 
Merge remote-tracking branch 'public/bug7768' into maint-0.2.4

12 years agoUse --test-commandline name in tor-fw-helper manpage
Nick Mathewson [Tue, 19 Mar 2013 19:11:34 +0000 (15:11 -0400)] 
Use --test-commandline name in tor-fw-helper manpage

12 years agoUse option name --test-commandline in tor-fw-helper.
David Fifield [Wed, 13 Mar 2013 07:43:21 +0000 (00:43 -0700)] 
Use option name --test-commandline in tor-fw-helper.

It was previously --Test in the help output and --test-commandline in
the getopt call. The man page already had --test.

  (Originally by David, who resolved the tie in favor of "--test"; I
   chose --test-commandline" instead so that nothing that depended
   on it could break. -Nick)

12 years agoMerge remote-tracking branch 'public/bug8002' into maint-0.2.4
Nick Mathewson [Tue, 19 Mar 2013 18:26:45 +0000 (14:26 -0400)] 
Merge remote-tracking branch 'public/bug8002' into maint-0.2.4

12 years agoMerge remote-tracking branch 'public/bug8031' into maint-0.2.4
Nick Mathewson [Tue, 19 Mar 2013 18:18:07 +0000 (14:18 -0400)] 
Merge remote-tracking branch 'public/bug8031' into maint-0.2.4

12 years agoMerge branch 'bug7582_v2' into maint-0.2.4
Nick Mathewson [Tue, 19 Mar 2013 16:29:29 +0000 (12:29 -0400)] 
Merge branch 'bug7582_v2' into maint-0.2.4

12 years agoFree prepend_policy values in origin circuits
Nick Mathewson [Tue, 19 Mar 2013 16:29:08 +0000 (12:29 -0400)] 
Free prepend_policy values in origin circuits

12 years agoMerge remote-tracking branch 'public/bug6174' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 20:36:25 +0000 (16:36 -0400)] 
Merge remote-tracking branch 'public/bug6174' into maint-0.2.4

12 years agoMerge remote-tracking branch 'public/bug8062' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 20:33:47 +0000 (16:33 -0400)] 
Merge remote-tracking branch 'public/bug8062' into maint-0.2.4

12 years agoMerge branch 'bug7947' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 19:56:55 +0000 (15:56 -0400)] 
Merge branch 'bug7947' into maint-0.2.4

12 years agoHandle TRUNCATE correctly if our next channel isn't done yet.
Nick Mathewson [Mon, 18 Mar 2013 19:55:55 +0000 (15:55 -0400)] 
Handle TRUNCATE correctly if our next channel isn't done yet.

Patch from 'cypherpunks'. Fixes bug #7947. Bugfix on 0.0.7.1.

12 years agoMerge remote-tracking branch 'public/bug6164' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 19:45:49 +0000 (15:45 -0400)] 
Merge remote-tracking branch 'public/bug6164' into maint-0.2.4

12 years agoFix another case of bug 8206; patch from flupzor
Nick Mathewson [Mon, 18 Mar 2013 19:44:23 +0000 (15:44 -0400)] 
Fix another case of bug 8206; patch from flupzor

12 years agoMerge remote-tracking branch 'public/bug6673' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 19:40:50 +0000 (15:40 -0400)] 
Merge remote-tracking branch 'public/bug6673' into maint-0.2.4

12 years agoFix some wide lines
Nick Mathewson [Mon, 18 Mar 2013 19:39:11 +0000 (15:39 -0400)] 
Fix some wide lines

12 years agoMerge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 19:28:39 +0000 (15:28 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4

Conflicts:
src/test/test_addr.c

12 years agoMerge remote-tracking branch 'public/bug8377' into maint-0.2.3
Nick Mathewson [Mon, 18 Mar 2013 19:27:50 +0000 (15:27 -0400)] 
Merge remote-tracking branch 'public/bug8377' into maint-0.2.3

12 years agoMerge remote-tracking branch 'andrea/bug8435' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 19:17:11 +0000 (15:17 -0400)] 
Merge remote-tracking branch 'andrea/bug8435' into maint-0.2.4

12 years agoMake stream events for RESOLVE lookups more consistent
Nick Mathewson [Mon, 18 Mar 2013 19:13:59 +0000 (15:13 -0400)] 
Make stream events for RESOLVE lookups more consistent

Fixes 8203; patch by Desoxy

12 years agoMerge remote-tracking branch 'public/bug8290' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 19:07:02 +0000 (15:07 -0400)] 
Merge remote-tracking branch 'public/bug8290' into maint-0.2.4

12 years agoImprove comment for routers_with_measured_bw static var in dirserv.c
Andrea Shepard [Mon, 18 Mar 2013 19:04:41 +0000 (12:04 -0700)] 
Improve comment for routers_with_measured_bw static var in dirserv.c

12 years agoImprove comment on router_counts_toward_thresholds()
Andrea Shepard [Mon, 18 Mar 2013 18:58:30 +0000 (11:58 -0700)] 
Improve comment on router_counts_toward_thresholds()

12 years agoAdd dirserv_has_measured_bw() predicate wrapper for dirserv_query_measured_bw_cache()
Andrea Shepard [Mon, 18 Mar 2013 18:56:42 +0000 (11:56 -0700)] 
Add dirserv_has_measured_bw() predicate wrapper for dirserv_query_measured_bw_cache()

12 years agoMerge remote-tracking branch 'public/no_dup_guards' into maint-0.2.4
Nick Mathewson [Mon, 18 Mar 2013 18:50:01 +0000 (14:50 -0400)] 
Merge remote-tracking branch 'public/no_dup_guards' into maint-0.2.4

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 agoIgnore advertised bandwidths if we have enough measured bandwidths available
Andrea Shepard [Mon, 18 Mar 2013 18:15:21 +0000 (11:15 -0700)] 
Ignore advertised bandwidths if we have enough measured bandwidths available

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 agoLog fname:lineno in log messages for #7164
Nick Mathewson [Wed, 13 Mar 2013 14:42:58 +0000 (10:42 -0400)] 
Log fname:lineno in log messages for #7164

This should help us track down #7164 at last.

12 years agoOn END_REASON_EXITPOLICY, mark circuit as unusable for that address.
Nick Mathewson [Tue, 12 Mar 2013 03:37:47 +0000 (23:37 -0400)] 
On END_REASON_EXITPOLICY, mark circuit as unusable for that address.

Also, don't call the exit node 'reject *' unless our decision to pick
that node was based on a non-summarized version of that node's exit
policy.

rransom and arma came up with the ideas for this fix.

Fix for 7582; the summary-related part is a bugfix on 0.2.3.2-alpha.

12 years agoFix option names in tor-fw-helper manpage
Nick Mathewson [Mon, 11 Mar 2013 21:57:27 +0000 (17:57 -0400)] 
Fix option names in tor-fw-helper manpage

fix for bug 7768

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 agoAnother possible diagnostic for 8031.
Nick Mathewson [Mon, 11 Mar 2013 18:52:56 +0000 (14:52 -0400)] 
Another possible diagnostic for 8031.

This time, I'm checking whether our calculated offset matches our
real offset, in each case, as we go along.  I don't think this is
the bug, but it can't hurt to check.

12 years agoCheck more error codes when writing microdescriptors.
Nick Mathewson [Mon, 11 Mar 2013 18:50:41 +0000 (14:50 -0400)] 
Check more error codes when writing microdescriptors.

Possible partial fix, or diagnosis tool, for bug 8031.

12 years agoUse fds, not stdio, to manage microdescriptor files
Nick Mathewson [Mon, 11 Mar 2013 18:37:44 +0000 (14:37 -0400)] 
Use fds, not stdio, to manage microdescriptor files

This is part of an attempt to mitigate 8031.

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 agoGive an #error when we want threads and OpenSSL has disabled threads
Nick Mathewson [Mon, 11 Mar 2013 17:23:10 +0000 (13:23 -0400)] 
Give an #error when we want threads and OpenSSL has disabled threads

Fixes ticket 6673.

12 years agoIncrease link_proto field to 2 bytes
Nick Mathewson [Mon, 11 Mar 2013 16:34:14 +0000 (12:34 -0400)] 
Increase link_proto field to 2 bytes

This should have been 2 bytes all along, since version numbers can
be 16 bits long.  This isn't a live bug, since the call to
is_or_protocol_version_known in channel_tls_process_versions_cell
will reject any version number not in the range 1..4.  Still, let's
fix this before we accidentally start supporting version 256.

Reported pseudonymously. Fixes bug 8062; bugfix on 0.2.0.10-alpha --
specifically, on commit 6fcda529, where during development I
increased the width of a version to 16 bits without changing the
type of link_proto.

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 agoBetter comment for dirserv_query_measured_bw_cache()
Andrea Shepard [Thu, 7 Mar 2013 23:59:30 +0000 (15:59 -0800)] 
Better comment for dirserv_query_measured_bw_cache()

12 years agoUse DIGESTMAP_FOREACH_MODIFY in dirserv_expire_measured_bw_cache() for concision
Andrea Shepard [Thu, 7 Mar 2013 23:55:01 +0000 (15:55 -0800)] 
Use DIGESTMAP_FOREACH_MODIFY in dirserv_expire_measured_bw_cache() for concision

12 years agoAdd unit test for dirserv measured bandwidth cache
Andrea Shepard [Thu, 7 Mar 2013 23:41:22 +0000 (15:41 -0800)] 
Add unit test for dirserv measured bandwidth cache

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 agoMake sure expiry check in dirserv_expire_measured_bw_cache() works if time_t is unsigned
Andrea Shepard [Thu, 7 Mar 2013 13:10:54 +0000 (05:10 -0800)] 
Make sure expiry check in dirserv_expire_measured_bw_cache() works if time_t is unsigned

12 years agoMore constness in dirserv.c
Andrea Shepard [Thu, 7 Mar 2013 13:05:56 +0000 (05:05 -0800)] 
More constness in dirserv.c

12 years agoMake dirserv_cache_measured_bw() use a const measured_bw_line_t *
Andrea Shepard [Thu, 7 Mar 2013 11:42:14 +0000 (03:42 -0800)] 
Make dirserv_cache_measured_bw() use a const measured_bw_line_t *

12 years agoCall dirserv_clear_measured_bw_cache() from dirserv_free_all()
Andrea Shepard [Tue, 5 Mar 2013 21:11:43 +0000 (13:11 -0800)] 
Call dirserv_clear_measured_bw_cache() from dirserv_free_all()

12 years agoAdd unit test for tor_addr_is_loopback
Nick Mathewson [Fri, 1 Mar 2013 17:40:41 +0000 (12:40 -0500)] 
Add unit test for tor_addr_is_loopback

12 years agoMake sure that [::1] is recognized as a private address
Nick Mathewson [Fri, 1 Mar 2013 17:22:57 +0000 (12:22 -0500)] 
Make sure that [::1] is recognized as a private address

Fixes bug 8377; bugfix on 0.2.1.3-alpha.

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 agoPrefer measured bandwidths over advertised when computing things for votes on a dirauth
Andrea Shepard [Thu, 28 Feb 2013 03:43:50 +0000 (19:43 -0800)] 
Prefer measured bandwidths over advertised when computing things for votes on a dirauth

12 years agoRemove some lingering tsocks cruft.
Nick Mathewson [Thu, 28 Feb 2013 00:38:32 +0000 (19:38 -0500)] 
Remove some lingering tsocks cruft.

Now the manpages no longer refer to tsocks or tsocks.conf, and we no
longer have or ship a tor-tsocks.conf.  The only remaining instances
of "tsocks" in our repository are old ChangeLog and ReleaseNotes
entries, and the torify script saying that it doesn't support tsocks.

Fixes bug 8290.

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 agoRename circuit_expire_all_dirty_circs
Nick Mathewson [Tue, 19 Feb 2013 23:37:03 +0000 (18:37 -0500)] 
Rename circuit_expire_all_dirty_circs

The new name is circuit_mark_all_dirty_circs_as_unusable.

This resolves an XXX024

12 years agoStop frobbing timestamp_dirty as our sole means to mark circuits unusable
Nick Mathewson [Tue, 19 Feb 2013 23:29:17 +0000 (18:29 -0500)] 
Stop frobbing timestamp_dirty as our sole means to mark circuits unusable

In a number of places, we decrement timestamp_dirty by
MaxCircuitDirtiness in order to mark a stream as "unusable for any
new connections.

This pattern sucks for a few reasons:
  * It is nonobvious.
  * It is error-prone: decrementing 0 can be a bad choice indeed.
  * It really wants to have a function.

It can also introduce bugs if the system time jumps backwards, or if
MaxCircuitDirtiness is increased.

So in this patch, I add an unusable_for_new_conns flag to
origin_circuit_t, make it get checked everywhere it should (I looked
for things that tested timestamp_dirty), and add a new function to
frob it.

For now, the new function does still frob timestamp_dirty (after
checking for underflow and whatnot), in case I missed any cases that
should be checking unusable_for_new_conns.

Fixes bug 6174. We first used this pattern in 516ef41ac1fd26f338c,
which I think was in 0.0.2pre26 (but it could have been 0.0.2pre27).

12 years agoMake a parse_config_line_from_str variant that gives error messages
Nick Mathewson [Tue, 19 Feb 2013 22:32:15 +0000 (17:32 -0500)] 
Make a parse_config_line_from_str variant that gives error messages

Without this patch, there's no way to know what went wrong when we
fail to parse a torrc line entirely (that is, we can't turn it into
a K,V pair.)  This patch introduces a new function that yields an
error message on failure, so we can at least tell the user what to
look for in their nonfunctional torrc.

(Actually, it's the same function as before with a new name:
parse_config_line_from_str is now a wrapper macro that the unit
tests use.)

Fixes bug 7950; fix on 0.2.0.16-alpha (58de695f9062576f) which first
introduced the possibility of a torrc value not parsing correctly.

12 years agoClear up a comment about when an assertion could fire
Nick Mathewson [Tue, 19 Feb 2013 21:23:58 +0000 (16:23 -0500)] 
Clear up a comment about when an assertion could fire

Resolves ticket 6164

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.