Nick Mathewson
22f2f13f81
prop271: make entry_guard_t mostly-private
...
The entry_guard_t structure should really be opaque, so that we
can change its contents and have the rest of Tor not care.
This commit makes it "mostly opaque" -- circpathbias.c can still see
inside it. (I'm making circpathbias.c exempt since it's the only
part of Tor outside of entrynodes.c that made serious use of
entry_guard_t internals.)
2016-11-30 14:42:52 -05:00
Nick Mathewson
c35d481f56
Merge branch 'maint-0.2.9'
2016-11-21 12:44:21 -05:00
Nick Mathewson
ded58777c5
Merge remote-tracking branch 'dgoulet/bug20629_030_01'
2016-11-17 20:12:13 -05:00
Nick Mathewson
b5d738e481
Merge remote-tracking branch 'public/bug20558'
2016-11-17 20:10:40 -05:00
Nick Mathewson
a742637f5a
Merge remote-tracking branch 'public/bug20630'
2016-11-17 20:09:44 -05:00
Ivan Markin
fe711c2944
Fix and simplify error handling code in rend_service_parse_port_config()
2016-11-17 20:06:37 -05:00
Ivan Markin
a847e16cbb
Fix comment for rend_service_parse_port_config()
2016-11-17 20:05:19 -05:00
Roger Dingledine
f12aad7f09
don't attempt a resolve when the cached answer will do
...
For relays that don't know their own address, avoid attempting
a local hostname resolve for each descriptor we download. Also cut
down on the number of "Success: chose address 'x.x.x.x'" log lines.
Fixes bugs 20423 and 20610; bugfix on 0.2.8.1-alpha.
2016-11-16 16:22:11 -05:00
Roger Dingledine
3bb40b213b
refactor router_pick_published_address to have another arg
...
no change in behavior except fewer log entries in the case where we use
a cached result.
2016-11-16 16:13:03 -05:00
Nick Mathewson
307d244640
Fix a "shouldn't have reached this" warning in connection_edge.c
...
This was bug 20630; bugfix on f3e158ed
where I thought I was
committing a documentation-only fix but instead messed up the
control flow too.
2016-11-14 09:16:57 -05:00
David Goulet
c82881a235
hs: Remove pointless NULL check found by Coverity
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-10 12:32:18 -05:00
Nick Mathewson
5e16c3f5fa
Merge remote-tracking branch 'dgoulet/bug20567_030_01'
2016-11-10 09:27:45 -05:00
Nick Mathewson
b6164e1604
Merge remote-tracking branch 'public/feature20552'
2016-11-10 09:25:11 -05:00
Nick Mathewson
217b895831
Merge remote-tracking branch 'dgoulet/ticket19642_030_01'
2016-11-10 09:16:00 -05:00
Matt Nordhoff
7dee70c3e1
Add "TByte" and "TBytes" units; also add "TBits" to man page
2016-11-10 09:13:27 -05:00
Nick Mathewson
0f4f63b7b8
Merge branch 'maint-0.2.9'
2016-11-10 09:11:35 -05:00
teor
0ec94588ab
Stop logging single onion and Tor2web long-term one-hop circuits
...
Single onion services and Tor2web deliberately create long-term one-hop
circuits to their intro and rend points, respectively.
These log messages are intended to diagnose issue 8387, which relates to
circuits hanging around forever for no reason.
Fixes bug 20613; bugfix on 0.2.9.1-alpha. Reported by "pastly".
2016-11-09 11:23:51 +11:00
teor
5dca9487c4
Call get_options() once at the top of circuit_log_ancient_one_hop_circuits()
...
Refactoring, no behaviour change.
2016-11-09 11:15:48 +11:00
Nick Mathewson
c58592e658
Merge branch 'maint-0.2.9'
2016-11-08 18:51:19 -05:00
Nick Mathewson
89ec191b68
Merge remote-tracking branch 'public/bug20306_029' into maint-0.2.9
2016-11-08 18:51:07 -05:00
David Goulet
34f14a35b6
hs: Add single-onion-service line to v3 descriptor
...
This field indicates if the service is a Single Onion Service if present in
the descriptor.
Closes #19642
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-08 13:22:42 -05:00
Nick Mathewson
d1a0f2e7e4
Merge branch 'maint-0.2.9'
2016-11-08 07:12:16 -05:00
teor
38e3f91c63
When using exponential backoff in test networks, use a lower exponent
...
Lower exponents mean that delays do not vary as much. This helps test
networks bootstrap consistently.
Bugfix on 20499.
2016-11-08 16:42:26 +11:00
Nick Mathewson
3e3040a5d9
Merge branch 'maint-0.2.9'
...
Conflicts:
src/or/rendservice.c
2016-11-07 16:31:40 -05:00
Nick Mathewson
c2fc0941a5
Merge remote-tracking branch 'teor/bug20484_029_v2' into maint-0.2.9
2016-11-07 16:12:13 -05:00
David Goulet
4ff534495f
hs: Document arguments of rend_data_*_create()
...
Fixes #20567
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-07 14:03:32 -05:00
Nick Mathewson
89edef6afb
Treat bacoff/schedule mismatch as a bug.
2016-11-07 11:05:57 -05:00
Nick Mathewson
1934bf75ef
Merge branch 'maint-0.2.9'
2016-11-07 11:02:15 -05:00
Nick Mathewson
e51f105c41
Reduce multiplier to 3, per teor's recommendation on #20534
...
(Three _is_ a good number for anonymity!)
2016-11-07 11:01:21 -05:00
Nick Mathewson
85970f7047
Always increment delays by at least 1.
2016-11-07 11:01:21 -05:00
Nick Mathewson
1fdf6e5814
Avoid integer overflow in delay calculation.
2016-11-07 11:01:21 -05:00
Nick Mathewson
864c42f4d6
Count HTTP 503 as a download failure.
...
Because as Teor puts it: "[Resetting on 503] is exactly what we
don't want when relays are busy - imagine clients doing an automatic
reset every time they DoS a relay..."
Fixes bug 20593.
2016-11-07 11:01:21 -05:00
Nick Mathewson
667ba776b1
Adjust download schedules per teor's #20534 recommendataions
2016-11-07 11:01:20 -05:00
Nick Mathewson
800dff1308
Merge branch 'maint-0.2.9'
2016-11-07 09:32:21 -05:00
Nick Mathewson
d82ffb77f3
Merge branch '20499_part1_029_squashed', remote-tracking branches 'teor/bug20591_029' and 'teor/bug20533_029' into maint-0.2.9
2016-11-07 09:20:13 -05:00
Nick Mathewson
858867a31a
Allow infinitely long delays in exponential-backoff downloads
...
It's only safe to remove the failure limit (per 20536) if we are in
fact waiting a bit longer each time we try to download.
Fixes bug 20534; bugfix on 0.2.9.1-alpha.
2016-11-07 09:19:35 -05:00
teor
e819d420c5
When downloading certificates, check for related failures
...
If a consensus expires while we are waiting for certificates to download,
stop waiting for certificates.
If we stop waiting for certificates less than a minute after we started
downloading them, do not consider the certificate download failure a
separate failure.
Fixes bug 20533; bugfix on commit e0204f21
in 0.2.0.9-alpha.
2016-11-08 00:01:20 +11:00
teor
1bb28cecd9
Ensure relays don't make multiple connections during bootstrap
...
Relays do not deliberately launch multiple attempts, so the impact of this
bug should be minimal. This fix also defends against bugs like #20499 .
Bugfix on 0.2.8.1-alpha.
2016-11-07 23:05:55 +11:00
Nick Mathewson
4e15c2cb7d
Merge branch 'maint-0.2.9'
2016-11-06 20:32:21 -05:00
Nick Mathewson
f6a3d213e4
Finish a sentence in a comment. Close 20576.
2016-11-06 20:31:50 -05:00
Nick Mathewson
0b787b1daf
Workaround for warning in desc_encode_v3().
...
Fixes bug 20581.
2016-11-06 20:27:14 -05:00
Nick Mathewson
5385a023e1
Do not apply 'max_failures' to random-exponential schedules.
...
Fixes bug 20536; bugfix on 0.2.9.1-alpha.
2016-11-06 20:08:11 -05:00
Nick Mathewson
e9ce181955
Change a BUG warning to be a warning, not an info.
2016-11-06 20:01:24 -05:00
Nick Mathewson
1b22eae120
Fix get_delay() code to avoid TIME_MAX overflow, not INT_MAX.
...
Fixes bug 20587; bugfix on 35bbf2e4a4
in 0.2.8.1-alpha.
2016-11-06 19:50:08 -05:00
Nick Mathewson
f45a581486
Fix some 32-bit warnings and clang warnings
2016-11-04 15:24:30 -04:00
Nick Mathewson
d16b4b3e48
Fix memory leaks in hs_descriptor/decode_descriptor and in encode_enc_key()
2016-11-04 14:27:45 -04:00
Nick Mathewson
a4291eef5a
Expose desc_intro_point_free to the tests, and use it.
...
Also fix another couple of leaks.
2016-11-04 14:22:04 -04:00
David Goulet
6ac85ca2b4
prop224: Fix crosscert memory leaks on error
2016-11-04 14:16:42 -04:00
Nick Mathewson
29ae8dcf96
Fix a bunch of leaks in hs_cache/upload_and_download_hs_desc
2016-11-04 14:13:30 -04:00
David Goulet
954fb99a48
Fix a use-after-free error.
2016-11-04 14:07:33 -04:00