Commit Graph

9654 Commits

Author SHA1 Message Date
Nick Mathewson
139d367f29 Fix 8833: crash bug from using NULL node->ri in dirserv.c
It appears that moria1 crashed because of one instance of this (the
one in router_counts_toward_thresholds).  The other instance I fixed
won't actually have broken anything, but I think it's more clear this
way.

Fixes bug 8833; bugfix on 0.2.4.12-alpha.
2013-05-05 18:52:53 -04:00
Nick Mathewson
f8bb0064d6 Merge remote-tracking branch 'public/bug6026' into maint-0.2.4 2013-04-24 22:15:47 -04:00
Mike Perry
ac22bf27d7 Increase the pathbias state file miscounting version check.
We now know the bug is present in 0.2.4.12-alpha too. It should be fixed in
0.2.4.13-alpha, though.
2013-04-24 22:03:03 -04:00
Mike Perry
2170f89a93 Bug 8235: Fix scaling adjustments.
We need to subtract both the current built circuits *and* the attempted
circuits from the attempt count during scaling, since *both* have already been
counted there.
2013-04-24 22:03:02 -04:00
Nick Mathewson
b933360ee8 Add a boolean to flag-thresholds for "we have enough measured bandwidth"
Implements #8711.
2013-04-18 22:43:52 -04:00
Nick Mathewson
e35ca13528 Merge remote-tracking branch 'public/bug8716_023' into maint-0.2.4 2013-04-18 21:33:53 -04:00
Nick Mathewson
06efbbb47e Merge remote-tracking branch 'public/bug8719' into maint-0.2.4 2013-04-18 11:26:54 -04:00
Nick Mathewson
8362f8854a Merge branch 'less_charbuf_rebased' into maint-0.2.4
Conflicts:
	src/or/dirserv.c
	src/or/dirserv.h
	src/test/test_dir.c
2013-04-18 11:13:36 -04:00
Nick Mathewson
992bbd02f9 Re-enable test for parsing and generating descriptor with exit policy
Looks like I turned this off in 6ac42f5e back in 2003 and never got
around to making it work again.  There has been no small amount of
code drift.
2013-04-18 11:04:58 -04:00
Nick Mathewson
0f83fcc5c2 Add a quick-and-dirty-test for generate_v2_networkstatus.
It sure is a good thing we can run each test in its own process, or
else the amount of setup I needed to do to make this thing work
would have broken all the other tests.

Test mocking would have made this easier to write too.
2013-04-18 11:04:58 -04:00
Nick Mathewson
6706a05b79 Remove the now-unused router_get_networkstatus_v3_hash 2013-04-18 11:04:57 -04:00
Nick Mathewson
c35ef8e6e9 Test improvement: include microdesc lines in our synthetic microdesc consensuses. 2013-04-18 11:04:57 -04:00
Nick Mathewson
e1128d905c Fix a couple of documentation issues. 2013-04-18 11:04:57 -04:00
Nick Mathewson
d2d5a7dabc Remove some now-needless length defines 2013-04-18 11:04:57 -04:00
Nick Mathewson
28ef450b24 Remove RS_ENTRY_LEN
Nothing uses it any longer now that we use smartlists of strings for
stuff that manipulates iles of formatted routerstatuses.
2013-04-18 11:04:57 -04:00
Nick Mathewson
cb75519bbf Refactor dirobj signature generation
Now we can compute the hash and signature of a dirobj before
concatenating the smartlist, and we don't need to play silly games
with sigbuf and realloc any more.
2013-04-18 11:04:57 -04:00
Nick Mathewson
fd93622cc8 Use chunks, not buffers, for router descriptors 2013-04-18 11:04:56 -04:00
Nick Mathewson
1186628fa9 Refactor v2 networkstatus generation to avoid buffer-style 2013-04-18 11:04:56 -04:00
Nick Mathewson
9246a7ca58 Refactor routerstatus_format_entry to avoid character-buffers 2013-04-18 11:04:56 -04:00
Nick Mathewson
cd1cdae0fa Fix some wide lines 2013-04-18 10:30:14 -04:00
Nick Mathewson
cd2b508f4e Don't leak a waiting-for-certs consensus when accepting it.
I believe this was introduced in 6bc071f765, which makes
this a fix on 0.2.0.10-alpha.  But my code archeology has not extended
to actually testing that theory.
2013-04-17 11:53:52 -04:00
Nick Mathewson
0a9c17a61a Fix memory leak when sending configuration-changed event
Fix for bug #8718; bugfix on 0.2.3.3-alpha.
2013-04-17 11:34:15 -04:00
Nick Mathewson
b00a6211c5 Merge remote-tracking branch 'public/bug7143_v2' into maint-0.2.4 2013-04-17 10:49:59 -04:00
Nick Mathewson
42731f69ef Merge branch 'bug8037_squashed' into maint-0.2.4 2013-04-17 10:45:45 -04:00
Nick Mathewson
0cf2c01dbd Reject most directory documents with an internal NUL.
(Specifically, we reject all the ones that aren't NUL-terminated,
since a NUL-terminated thing can't have a NUL in the middle.)

Another fix for #8037.
2013-04-17 10:45:27 -04:00
Nick Mathewson
a6545d6335 Merge branch 'bug8683_rebased' into maint-0.2.4 2013-04-14 21:48:44 -04:00
Nick Mathewson
f3ae628517 Remove a now-empty if body; invert the sense of its condition 2013-04-14 21:47:29 -04:00
Nick Mathewson
c4de828923 Remvoe total_bandwidth and total_exit_bandwidth as unused. 2013-04-14 21:47:29 -04:00
Nick Mathewson
52cadff0d6 Rename all fields which measure bw in kb to end with _kb 2013-04-14 21:45:05 -04:00
Nick Mathewson
49696786fb Fix some KB/B confusion in flag threshold minima. 2013-04-14 21:43:50 -04:00
Nick Mathewson
97246a5b6d Merge remote-tracking branch 'public/bug5650_squashed' into maint-0.2.4 2013-04-12 01:13:22 -04:00
Nick Mathewson
39ac1db60e Avoid busy-looping on WANTREAD within connection_handle_write
Fix for bug 5650.  Also, if we get a WANTREAD while reading while
writing, make sure we're reading.
2013-04-12 01:11:31 -04:00
Nick Mathewson
265a7ebca6 Use credible_bandwidth uniformly in setting/using fast_bandwidth
We were using credible_bandwidth to build the fast_bandwidth
threshold, but comparing it to bandwidth_for_router.
2013-04-11 10:36:46 -04:00
Nick Mathewson
ec4ee3197f Use correct units for dirserv_get_{credible_bandwidth,bandwidth_for_router}
We were mixing bandwidth file entries (which are in kilobytes) with
router_get_advertised_bw() entries, which were in bytes.

Also, use router_get_advertised_bandwidth_capped() for credible_bandwidth.
2013-04-11 10:26:17 -04:00
Nick Mathewson
922ab0883d Merge remote-tracking branch 'public/bug8185_diagnostic' into maint-0.2.4 2013-04-11 01:46:28 -04:00
Nick Mathewson
ee3cc44f27 Merge remote-tracking branch 'public/bug7302' into maint-0.2.4
Conflicts:
	src/or/status.c
2013-04-11 01:42:54 -04:00
Nick Mathewson
7f50af116f Merge remote-tracking branch 'public/bug8117_023' into maint-0.2.4
Conflicts:
	doc/tor.1.txt
	src/or/config.c
	src/or/connection.c
2013-04-11 01:39:55 -04:00
Desoxy
74f5e304e4 Controller: Add CACHED keyword to ADDRMAP events (#8596 part 2/2)
Add keyword CACHED="YES"/"NO" to ADDRMAP control events to indicate whether the
DNS response will be cached or not.
2013-04-03 18:50:51 +02:00
Desoxy
2c40138210 Controller: Always send ADDRMAP event after RESOLVE command (#8596 part 1/2)
Since 7536c40 only DNS results for real SOCKS requests are added to the cache,
but not DNS results for DNSPort queries or control connection RESOLVE queries.
Only cache additions would trigger ADDRMAP events on successful resolve.

Change it so that DNS results received after a RESOLVE command also generate
ADDRMAP events.
2013-04-03 18:50:27 +02:00
Nick Mathewson
33b7083f26 Fix a wide line 2013-04-03 09:36:37 -04:00
Mike Perry
56e7dff7bd Add additional checks for Path Bias scaling.
Just in case more issues remain with scaling, it would be nice to pin-point
them as such.
2013-04-03 09:32:15 -04:00
Mike Perry
2b05a8c671 Clip invalid path bias counts at startup.
There was a bug in Tor prior to 0.2.4.10-alpha that allowed counts to
become invalid. Clipping the counts at startup allows us to rule out
log messages due to corruption from these prior Tor versions.
2013-04-03 09:32:15 -04:00
Nick Mathewson
856d57531b Merge remote-tracking branch 'public/bug7707_diagnostic' into maint-0.2.4 2013-04-02 10:41:14 -04:00
Nick Mathewson
2c155064aa Merge remote-tracking branch 'public/bug8427' into maint-0.2.4 2013-04-02 10:36:15 -04:00
Mike Perry
9117b14218 Bug #8196: Demote a path bias notice that can be caused by controllers.
We didn't see this in normal usage anyway.
2013-03-29 12:21:28 -04:00
Mike Perry
651e49713c Bug 8419: Apply the badexit fix from #2203 to validatio too
This was causing dirauths to emit flag weight validation warns if there
was a sufficiently large amount of badexit bandwidth to make a difference in
flag weight results.
2013-03-29 12:20:54 -04:00
Mike Perry
f6a2f088fd Bug 8477: Don't warn if fromerly GENERAL circuits still have streams.
This can happen in various cases of network failure.
2013-03-29 12:20:54 -04:00
Mike Perry
a7d6683629 Bug 8230: Mark circuits as opened before reachability testing.
Should silence two path bias Bug messages seen on relays at startup.
2013-03-29 12:20:54 -04:00
Mike Perry
d39e6736fe Don't relax the timeout for already opened 1-hop circuits. 2013-03-29 12:17:05 -04:00
Mike Perry
66586da9bc Add detail to log messages related to bug 7799.
Note this does not solve bug 7799, it is only to help us diagnose it.
2013-03-29 12:17:04 -04:00