]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
7 years agoMerge branch 'bug25581_033_v2_asn_squashed' into maint-0.3.3
Nick Mathewson [Wed, 11 Apr 2018 19:37:56 +0000 (15:37 -0400)] 
Merge branch 'bug25581_033_v2_asn_squashed' into maint-0.3.3

7 years agoRename HSLayer{2,3}Nodes to start without an underscore.
Nick Mathewson [Mon, 26 Mar 2018 13:25:38 +0000 (09:25 -0400)] 
Rename HSLayer{2,3}Nodes to start without an underscore.

The old single-underscore names remain as a deprecated synonym.

Fixes bug 25581; bugfix on 0.3.3.1-alpha.

7 years agoBug 24989: Count client hsdir gets towards MaxClientCircuitsPending.
Mike Perry [Wed, 24 Jan 2018 00:03:24 +0000 (00:03 +0000)] 
Bug 24989: Count client hsdir gets towards MaxClientCircuitsPending.

We removed this by breaking them out from general in #13837.

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 10 Apr 2018 18:26:32 +0000 (14:26 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 10 Apr 2018 18:26:32 +0000 (14:26 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Tue, 10 Apr 2018 18:26:29 +0000 (14:26 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge remote-tracking branch 'ahf-github/bugs/24854_029_2' into maint-0.2.9
Nick Mathewson [Tue, 10 Apr 2018 18:25:57 +0000 (14:25 -0400)] 
Merge remote-tracking branch 'ahf-github/bugs/24854_029_2' into maint-0.2.9

7 years agoLift the list of default directory servers into their own file.
Alexander Færøy [Fri, 6 Apr 2018 01:58:16 +0000 (03:58 +0200)] 
Lift the list of default directory servers into their own file.

This patch lifts the list of default directory authorities from config.c
into their own auth_dirs.inc file, which is then included in config.c
using the C preprocessor.

Patch by beastr0.

See: https://bugs.torproject.org/24854

7 years agoShip all files needed to build Tor with rust
Nick Mathewson [Fri, 6 Apr 2018 20:18:11 +0000 (16:18 -0400)] 
Ship all files needed to build Tor with rust

Fixes bug 25732; bugfix on 0.3.3.2-alpha when strings.rs was
introduced.

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 5 Apr 2018 16:09:00 +0000 (12:09 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'ticket25296_032_squashed' into maint-0.3.2
Nick Mathewson [Thu, 5 Apr 2018 16:08:53 +0000 (12:08 -0400)] 
Merge branch 'ticket25296_032_squashed' into maint-0.3.2

7 years agoPerConnBW{Rate,Burst} docs: do not say consensus param is always set
Nick Mathewson [Mon, 19 Mar 2018 10:14:57 +0000 (06:14 -0400)] 
PerConnBW{Rate,Burst} docs: do not say consensus param is always set

Closes ticket 25296; bugfix on 0.2.2.7-alpha when these manpage
entries were introduced.

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 5 Apr 2018 12:36:13 +0000 (08:36 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Thu, 5 Apr 2018 12:36:13 +0000 (08:36 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoSwitch Travis to stable rust
Taylor Yu [Wed, 4 Apr 2018 22:07:39 +0000 (17:07 -0500)] 
Switch Travis to stable rust

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Thu, 5 Apr 2018 12:22:34 +0000 (08:22 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Thu, 5 Apr 2018 12:22:34 +0000 (08:22 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Thu, 5 Apr 2018 12:22:34 +0000 (08:22 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'maint-0.2.5' into maint-0.2.9
Nick Mathewson [Thu, 5 Apr 2018 12:22:33 +0000 (08:22 -0400)] 
Merge branch 'maint-0.2.5' into maint-0.2.9

7 years agoMerge remote-tracking branch 'dgoulet/bug25582_033' into maint-0.3.3
Nick Mathewson [Thu, 5 Apr 2018 12:21:38 +0000 (08:21 -0400)] 
Merge remote-tracking branch 'dgoulet/bug25582_033' into maint-0.3.3

7 years agoMerge branch 'bug25679_033_squashed' into maint-0.3.3
Nick Mathewson [Thu, 5 Apr 2018 12:20:15 +0000 (08:20 -0400)] 
Merge branch 'bug25679_033_squashed' into maint-0.3.3

7 years agoFix the default for TOR_RUST_DEPENDENCIES
Nick Mathewson [Fri, 30 Mar 2018 12:53:58 +0000 (08:53 -0400)] 
Fix the default for TOR_RUST_DEPENDENCIES

By default, we want to look at the crates directory of the
submodule, not the toplevel of the submodule.  Fixes bug 25679;
bugfix on 0.3.3.1-alpha.

7 years agoUpdate geoip and geoip6 to the April 3 2018 database. maint-0.2.5
Karsten Loesing [Thu, 5 Apr 2018 08:42:25 +0000 (10:42 +0200)] 
Update geoip and geoip6 to the April 3 2018 database.

7 years agoman: Add a comment to anchor only option
David Goulet [Wed, 4 Apr 2018 15:38:42 +0000 (11:38 -0400)] 
man: Add a comment to anchor only option

Some anchor don't appear in the final man page so document those so we
understand why we do that in the future.

Part of #25582

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'bug21394_029_redux' into maint-0.3.3
Nick Mathewson [Wed, 4 Apr 2018 12:55:37 +0000 (08:55 -0400)] 
Merge branch 'bug21394_029_redux' into maint-0.3.3

7 years agoBug 21394 touchup: Increase DNS attempts to 3
Dhalgren [Sun, 1 Apr 2018 05:01:51 +0000 (05:01 +0000)] 
Bug 21394 touchup: Increase DNS attempts to 3

Also don't give up on a resolver as quickly if multiple are configured.

7 years agoadd a missing word
Nick Mathewson [Tue, 3 Apr 2018 19:31:30 +0000 (15:31 -0400)] 
add a missing word

7 years agoMerge remote-tracking branch 'isis-github/bug24031_r5_squashed_033' into maint-0.3.3
Nick Mathewson [Tue, 3 Apr 2018 19:29:29 +0000 (15:29 -0400)] 
Merge remote-tracking branch 'isis-github/bug24031_r5_squashed_033' into maint-0.3.3

7 years agochanges: Add changes file for #24031.
Isis Lovecruft [Tue, 3 Apr 2018 19:19:40 +0000 (19:19 +0000)] 
changes: Add changes file for #24031.

(cherry picked from commit 5a8cdec3f8617920f19e3ab7707233ad3f02424f)

7 years agorust: Fix ProtoSet and ProtoEntry to use the same DoS limits as C.
Isis Lovecruft [Tue, 27 Mar 2018 22:46:14 +0000 (22:46 +0000)] 
rust: Fix ProtoSet and ProtoEntry to use the same DoS limits as C.

Previously, the limit for MAX_PROTOCOLS_TO_EXPAND was actually being applied
in Rust to the maximum number of version (total, for all subprotocols).
Whereas in C, it was being applied to the number of subprotocols that were
allowed.  This changes the Rust to match C's behaviour.

7 years agorust: Port all C protover_all_supported tests to Rust.
Isis Lovecruft [Tue, 27 Mar 2018 21:38:29 +0000 (21:38 +0000)] 
rust: Port all C protover_all_supported tests to Rust.

The behaviours still do not match, unsurprisingly, but now we know where a
primary difference is: the Rust is validating version ranges more than the C,
so in the C it's possible to call protover_all_supported on a ridiculous
version range like "Sleen=0-4294967294" because the C uses
MAX_PROTOCOLS_TO_EXPAND to count the number of *subprotocols* whereas the Rust
uses it to count the total number of *versions* of all subprotocols.

7 years agotests: Run all existing protover tests in both languages.
Isis Lovecruft [Tue, 27 Mar 2018 21:36:10 +0000 (21:36 +0000)] 
tests: Run all existing protover tests in both languages.

There's now no difference in these tests w.r.t. the C or Rust: both
fail miserably (well, Rust fails with nice descriptive errors, and C
gives you a traceback, because, well, C).

7 years agotests: Make inline comments in test_protover.c more accurate.
Isis Lovecruft [Tue, 27 Mar 2018 21:34:00 +0000 (21:34 +0000)] 
tests: Make inline comments in test_protover.c more accurate.

The DoS potential is slightly higher in C now due to some differences to the
Rust code, see the C_RUST_DIFFERS tags in src/rust/protover/tests/protover.rs.

Also, the comment about "failing at the splitting stage" in Rust wasn't true,
since when we split, we ignore empty chunks (e.g. "1--1" parses into
"(1,None),(None,1)" and "None" can't be parsed into an integer).

Finally, the comment about "Rust seems to experience an internal error" is only
true in debug mode, where u32s are bounds-checked at runtime.  In release mode,
code expressing the equivalent of this test will error with
`Err(ProtoverError::Unparseable)` because 4294967295 is too large.

7 years agoprotover: Change protover_all_supported() to return only unsupported.
Isis Lovecruft [Tue, 27 Mar 2018 16:59:49 +0000 (16:59 +0000)] 
protover: Change protover_all_supported() to return only unsupported.

Previously, if "Link=1-5" was supported, and you asked protover_all_supported()
(or protover::all_supported() in Rust) if it supported "Link=3-999", the C
version would return "Link=3-999" and the Rust would return "Link=6-999".  These
both behave the same now, i.e. both return "Link=6-999".

7 years agorust: Refactor protover::compute_for_old_tor().
Isis Lovecruft [Tue, 27 Mar 2018 02:41:25 +0000 (02:41 +0000)] 
rust: Refactor protover::compute_for_old_tor().

During code review and discussion with Chelsea Komlo, she pointed out
that protover::compute_for_old_tor() was a public function whose
return type was `&'static CStr`.  We both agree that C-like parts of
APIs should:

1. not be exposed publicly (to other Rust crates),
2. only be called in the appropriate FFI code,
3. not expose types which are meant for FFI code (e.g. `*mut char`,
   `CString`, `*const c_int`, etc.) to the pure-Rust code of other
   crates.
4. FFI code (e.g. things in `ffi.rs` modules) should _never_ be called
   from pure-Rust, not even from other modules in its own crate
   (i.e. do not call `protover::ffi::*` from anywhere in
   `protover::protoset::*`, etc).

With that in mind, this commit makes the following changes:

 * CHANGE `protover::compute_for_old_tor()` to be
   visible only at the `pub(crate)` level.
 * RENAME `protover::compute_for_old_tor()` to
   `protover::compute_for_old_tor_cstr()` to reflect the last change.
 * ADD a new `protover::compute_for_old_tor()` function wrapper which
   is public and intended for other Rust code to use, which returns a
   `&str`.

7 years agorust: Refactor Rust implementation of protover_is_supported_here().
Isis Lovecruft [Wed, 21 Mar 2018 03:08:35 +0000 (03:08 +0000)] 
rust: Refactor Rust implementation of protover_is_supported_here().

It was changed to take borrows instead of taking ownership.

 * REFACTOR `protover::ffi::protover_is_supported_here()` to use changed method
   signature on `protover::is_supported_here()`.

7 years agorust: Refactor Rust impl of protover_compute_vote().
Isis Lovecruft [Wed, 21 Mar 2018 03:05:56 +0000 (03:05 +0000)] 
rust: Refactor Rust impl of protover_compute_vote().

This includes a subtle difference in behaviour to the previous Rust
implementation, where, for each vote that we're computing over, if a single one
fails to parse, we skip it.  This now matches the current behaviour in the C
implementation.

 * REFACTOR `protover::ffi::protover_compute_vote()` to use
   new types and methods.

7 years agorust: Refactor Rust impl of protover_list_supports_protocol_or_later().
Isis Lovecruft [Wed, 21 Mar 2018 02:59:25 +0000 (02:59 +0000)] 
rust: Refactor Rust impl of protover_list_supports_protocol_or_later().

This includes a subtle difference in behaviour, as in 4258f1e18, where we return
(matching the C impl's return behaviour) earlier than before if parsing failed,
saving us computation in parsing the versions into a
protover::protoset::ProtoSet.

 * REFACTOR `protover::ffi::protover_list_supports_protocol_or_later()` to use
   new types and methods.

7 years agorust: Refactor Rust impl of protover_list_supports_protocol().
Isis Lovecruft [Wed, 21 Mar 2018 02:52:04 +0000 (02:52 +0000)] 
rust: Refactor Rust impl of protover_list_supports_protocol().

This includes a subtle difference in behaviour, as in 4258f1e18, where we return
(matching the C impl's return behaviour) earlier than before if parsing failed,
saving us computation in parsing the versions into a
protover::protoset::ProtoSet.

 * REFACTOR `protover::ffi::protover_list_supports_protocol()` to use new types
   and methods.

7 years agorust: Refactor Rust impl of protover_all_supported().
Isis Lovecruft [Wed, 21 Mar 2018 02:45:41 +0000 (02:45 +0000)] 
rust: Refactor Rust impl of protover_all_supported().

This includes differences in behaviour to before, which should now more closely
match the C version:

 - If parsing a protover `char*` from C, and the string is not parseable, this
   function will return 1 early, which matches the C behaviour when protocols
   are unparseable.  Previously, we would parse it and its version numbers
   simultaneously, i.e. there was no fail early option, causing us to spend more
   time unnecessarily parsing versions.

 * REFACTOR `protover::ffi::protover_all_supported()` to use new types and
   methods.

7 years agorust: Refactor protover tests with new methods; note altered behaviours.
Isis Lovecruft [Wed, 21 Mar 2018 02:13:40 +0000 (02:13 +0000)] 
rust: Refactor protover tests with new methods; note altered behaviours.

Previously, the rust implementation of protover considered an empty string to be
a valid ProtoEntry, while the C version did not (it must have a "=" character).
Other differences include that unknown protocols must now be parsed as
`protover::UnknownProtocol`s, and hence their entries as
`protover::UnvalidatedProtoEntry`s, whereas before (nearly) all protoentries
could be parsed regardless of how erroneous they might be considered by the C
version.

My apologies for this somewhat messy and difficult to read commit, if any part
is frustrating to the reviewer, please feel free to ask me to split this into
smaller changes (possibly hard to do, since so much changed), or ask me to
comment on a specific line/change and clarify how/when the behaviours differ.

The tests here should more closely match the behaviours exhibited by the C
implementation, but I do not yet personally guarantee they match precisely.

 * REFACTOR unittests in protover::protover.
 * ADD new integration tests for previously untested behaviour.
 * FIXES part of #24031: https://bugs.torproject.org/24031.

7 years agorust: Refactor protover::is_supported_here().
Isis Lovecruft [Wed, 21 Mar 2018 02:09:04 +0000 (02:09 +0000)] 
rust: Refactor protover::is_supported_here().

This changes `protover::is_supported_here()` to be aware of new datatypes
(e.g. don't call `.0` on things which are no longer tuple structs) and also
changes the method signature to take borrows, making it faster, threadable, and
easier to read (i.e. the caller can know from reading the function signature
that the function won't mutate values passed into it).

 * CHANGE the `protover::is_supported_here()` function to take borrows.
 * REFACTOR the `protover::is_supported_here()` function to be aware of new
   datatypes.
 * FIXES part of #24031: https://bugs.torproject.org/24031

7 years agorust: Add new ProtoverVote type and refactor functions to methods.
Isis Lovecruft [Wed, 21 Mar 2018 01:52:41 +0000 (01:52 +0000)] 
rust: Add new ProtoverVote type and refactor functions to methods.

This adds a new type for votes upon `protover::ProtoEntry`s (technically, on
`protover::UnvalidatedProtoEntry`s, because the C code does not validate based
upon currently known protocols when voting, in order to maintain
future-compatibility), and converts several functions which would have operated
on this datatype into methods for ease-of-use and readability.

This also fixes a behavioural differentce to the C version of
protover_compute_vote().  The C version of protover_compute_vote() calls
expand_protocol_list() which checks if there would be too many subprotocols *or*
expanded individual version numbers, i.e. more than MAX_PROTOCOLS_TO_EXPAND, and
does this *per vote* (but only in compute_vote(), everywhere else in the C seems
to only care about the number of subprotocols, not the number of individual
versions).  We need to match its behaviour in Rust and ensure we're not allowing
more than it would to get the votes to match.

 * ADD new `protover::ProtoverVote` datatype.
 * REMOVE the `protover::compute_vote()` function and refactor it into an
   equivalent-in-behaviour albeit more memory-efficient voting algorithm based
   on the new underlying `protover::protoset::ProtoSet` datatype, as
   `ProtoverVote::compute()`.
 * REMOVE the `protover::write_vote_to_string()` function, since this
   functionality is now generated by the impl_to_string_for_proto_entry!() macro
   for both `ProtoEntry` and `UnvalidatedProtoEntry` (the latter of which is the
   correct type to return from a voting protocol instance, since the entity
   voting may not know of all protocols being voted upon or known about by other
   voting parties).
 * FIXES part of #24031: https://bugs.torproject.org/24031

rust: Fix a difference in compute_vote() behaviour to C version.

7 years agorust: Add macro for `impl ToString for {Unvalidated}ProtoEntry`.
Isis Lovecruft [Wed, 21 Mar 2018 01:44:59 +0000 (01:44 +0000)] 
rust: Add macro for `impl ToString for {Unvalidated}ProtoEntry`.

This implements conversions from either a ProtoEntry or an UnvalidatedProtoEntry
into a String, for use in replacing such functions as
`protover::write_vote_to_string()`.

 * ADD macro for implementing ToString trait for ProtoEntry and
   UnvalidatedProtoEntry.
 * FIXES part of #24031: https://bugs.torproject.org/24031

7 years agorust: Add new protover::UnvalidatedProtoEntry type.
Isis Lovecruft [Wed, 21 Mar 2018 01:29:36 +0000 (01:29 +0000)] 
rust: Add new protover::UnvalidatedProtoEntry type.

This adds a new protover::UnvalidatedProtoEntry type, which is the
UnknownProtocol variant of a ProtoEntry, and refactors several functions which
should operate on this type into methods.

This also fixes what was previously another difference to the C implementation:
if you asked the C version of protovet_compute_vote() to compute a single vote
containing "Fribble=", it would return NULL.  However, the Rust version would
return "Fribble=" since it didn't check if the versions were empty before
constructing the string of differences.  ("Fribble=" is technically a valid
protover string.)  This is now fixed, and the Rust version in that case will,
analogous to (although safer than) C returning a NULL, return None.

 * REMOVE internal `contains_only_supported_protocols()` function.
 * REMOVE `all_supported()` function and refactor it into
   `UnvalidatedProtoEntry::all_supported()`.
 * REMOVE `parse_protocols_from_string_with_no_validation()` and
   refactor it into the more rusty implementation of
   `impl FromStr for UnvalidatedProtoEntry`.
 * REMOVE `protover_string_supports_protocol()` and refactor it into
   `UnvalidatedProtoEntry::supports_protocol()`.
 * REMOVE `protover_string_supports_protocol_or_later()` and refactor
   it into `UnvalidatedProtoEntry::supports_protocol_or_later()`.
 * FIXES part of #24031: https://bugs.torproject.org/24031

rust: Fix another C/Rust different in compute_vote().

This fixes the unittest from the prior commit by checking if the versions are
empty before adding a protocol to a vote.

7 years agorust: Add new protover::ProtoEntry type which uses new datatypes.
Isis Lovecruft [Wed, 21 Mar 2018 01:18:02 +0000 (01:18 +0000)] 
rust: Add new protover::ProtoEntry type which uses new datatypes.

This replaces the `protover::SupportedProtocols` (why would you have a type just
for things which are supported?) with a new, more generic type,
`protover::ProtoEntry`, which utilises the new, more memory-efficient datatype
in protover::protoset.

 * REMOVE `get_supported_protocols()` and `SupportedProtocols::tor_supported()`
   (since they were never used separately) and collapse their functionality into
   a single `ProtoEntry::supported()` method.
 * REMOVE `SupportedProtocols::from_proto_entries()` and reimplement its
   functionality as the more rusty `impl FromStr for ProtoEntry`.
 * REMOVE `get_proto_and_vers()` function and refactor it into the more rusty
   `impl FromStr for ProtoEntry`.
 * FIXES part of #24031: https://bugs.torproject.org/24031

7 years agorust: Add new protover::UnknownProtocol type.
Isis Lovecruft [Wed, 21 Mar 2018 01:07:18 +0000 (01:07 +0000)] 
rust: Add new protover::UnknownProtocol type.

 * ADD new type, protover::UnknownProtocol, so that we have greater type safety
   and our protover functionality which works with unsanitised protocol names is
   more clearly demarcated.
 * REFACTOR protover::Proto, renaming it protover::Protocol to mirror the new
   protover::UnknownProtocol type name.
 * ADD a utility conversion of `impl From<Protocol> for UnknownProtocol` so that
   we can easily with known protocols and unknown protocols simultaneously
   (e.g. doing comparisons, checking their version numbers), while not allowing
   UnknownProtocols to be accidentally used in functions which should only take
   Protocols.
 * FIXES part of #24031: https://bugs.torproject.org/24031

7 years agorust: Implement more memory-efficient protover datatype.
Isis Lovecruft [Wed, 21 Mar 2018 00:43:55 +0000 (00:43 +0000)] 
rust: Implement more memory-efficient protover datatype.

 * ADD new protover::protoset module.
 * ADD new protover::protoset::ProtoSet class for holding protover versions.
 * REMOVE protover::Versions type implementation and its method
   `from_version_string()`, and instead implement this behaviour in a more
   rust-like manner as `impl FromStr for ProtoSet`.
 * MOVE the `find_range()` utility function from protover::protover to
   protover::protoset since it's only used internally in the
   implementation of ProtoSet.
 * REMOVE the `contract_protocol_list()` function from protover::protover and
   instead refactor it (reusing nearly the entire thing, with minor superficial,
   i.e. non-behavioural, changes) into a more rusty
   `impl ToString for ProtoSet`.
 * REMOVE the `expand_version_range()` function from protover::protover and
   instead refactor it into a more rusty implementation of
   `impl Into<Vec<Version>> for ProtoSet` using the new error types in
   protover::errors.
 * FIXES part of #24031: https://bugs.torproject.org/24031.

7 years agorust: Implement error types for Rust protover implementation.
Isis Lovecruft [Wed, 21 Mar 2018 00:24:46 +0000 (00:24 +0000)] 
rust: Implement error types for Rust protover implementation.

This will allow us to do actual error handling intra-crate in a more
rusty manner, e.g. propogating errors in match statements, conversion
between error types, logging messages, etc.

 * FIXES part of #24031: https://bugs.torproject.org/24031.

7 years agodir auths no longer vote Guard if they're not voting V2Dir
Roger Dingledine [Mon, 2 Apr 2018 04:20:01 +0000 (00:20 -0400)] 
dir auths no longer vote Guard if they're not voting V2Dir

Directory authorities no longer vote in favor of the Guard flag
for relays that don't advertise directory support.

Starting in Tor 0.3.0.1-alpha, Tor clients have been avoiding using
such relays in the Guard position, leading to increasingly broken load
balancing for the 5%-or-so of Guards that don't advertise directory
support.

Fixes bug 22310; bugfix on 0.3.0.6.

7 years agoRemove erroneous section heading "ExitPolicyDefault"
Nick Mathewson [Thu, 29 Mar 2018 19:06:07 +0000 (15:06 -0400)] 
Remove erroneous section heading "ExitPolicyDefault"

The anchor here was originally introduced to make sure that the
manpage would format correctly, but we had mistaken it for a section
anchor, and introduced a bogus section heading in 3563a2c8194ebe94.

Fixes bug 25582; bugfix on 0.3.3.1-alpha.

7 years agoDocument torrc options that only work on v2 onion services
teor [Wed, 28 Mar 2018 06:10:31 +0000 (17:10 +1100)] 
Document torrc options that only work on v2 onion services

RendPostPeriod only works on v2 onion services.
HiddenServiceAuthorizeClient is not yet implemented for v3 onion services.

Closes ticket #25661, bugfix on 0.3.2.1-alpha.

7 years agoMerge branch 'bug25617_029' into maint-0.3.3
Nick Mathewson [Thu, 29 Mar 2018 18:58:58 +0000 (14:58 -0400)] 
Merge branch 'bug25617_029' into maint-0.3.3

7 years agobump version to 0.3.3.4-alpha-dev
Nick Mathewson [Thu, 29 Mar 2018 15:24:02 +0000 (11:24 -0400)] 
bump version to 0.3.3.4-alpha-dev

7 years agoMark controller-initiated DNS lookups as permitted to do DNS.
Nick Mathewson [Thu, 29 Mar 2018 13:27:28 +0000 (09:27 -0400)] 
Mark controller-initiated DNS lookups as permitted to do DNS.

Fixes bug 25617; bugfix on 0.2.9.3-alpha.

7 years agoBump version to 0.3.3.4-alpha
Nick Mathewson [Thu, 29 Mar 2018 12:01:37 +0000 (08:01 -0400)] 
Bump version to 0.3.3.4-alpha

7 years agoMerge remote-tracking branch 'dgoulet/bug24767_033_03' into maint-0.3.3
Nick Mathewson [Wed, 28 Mar 2018 18:21:04 +0000 (14:21 -0400)] 
Merge remote-tracking branch 'dgoulet/bug24767_033_03' into maint-0.3.3

7 years agoadd a changes file for the rust libc update
Nick Mathewson [Wed, 28 Mar 2018 12:10:54 +0000 (08:10 -0400)] 
add a changes file for the rust libc update

7 years agoBug 25664: Update libc version requirement for Rust
Georg Koppen [Wed, 28 Mar 2018 10:19:31 +0000 (10:19 +0000)] 
Bug 25664: Update libc version requirement for Rust

When merging the patches for #25310 the libc version requirement in
`GettingStartedRust.md` and `configure.ac` did not get updated to the
now needed 0.2.39.

7 years agoMerge branch 'bugs25036_25055_clean_033' into maint-0.3.3
Nick Mathewson [Wed, 28 Mar 2018 11:49:34 +0000 (07:49 -0400)] 
Merge branch 'bugs25036_25055_clean_033' into maint-0.3.3

7 years agoAdd a paranoia check in string_is_valid_nonrfc_hostname()
Nick Mathewson [Wed, 28 Mar 2018 11:48:18 +0000 (07:48 -0400)] 
Add a paranoia check in string_is_valid_nonrfc_hostname()

The earlier checks in this function should ensure that components is
always nonempty.  But in case somebody messes with them in the
future, let's add an extra check to make sure we aren't crashing.

7 years agoRename string_is_valid_hostname -> string_is_valid_nonrfc_hostname
Nick Mathewson [Wed, 28 Mar 2018 11:42:27 +0000 (07:42 -0400)] 
Rename string_is_valid_hostname -> string_is_valid_nonrfc_hostname

Per discussion on 25055.

7 years agoDon't strlen before checking for NULL
rl1987 [Thu, 22 Feb 2018 18:52:40 +0000 (19:52 +0100)] 
Don't strlen before checking for NULL

7 years agoTweak loop condition
rl1987 [Wed, 21 Feb 2018 19:25:24 +0000 (20:25 +0100)] 
Tweak loop condition

7 years agoDon't explode on NULL or empty string
rl1987 [Wed, 21 Feb 2018 19:23:21 +0000 (20:23 +0100)] 
Don't explode on NULL or empty string

7 years agoAllow alphanumeric TLDs in test for now
rl1987 [Tue, 20 Feb 2018 18:52:48 +0000 (19:52 +0100)] 
Allow alphanumeric TLDs in test for now

7 years agoSimplify hostname validation code
rl1987 [Mon, 19 Feb 2018 20:08:51 +0000 (21:08 +0100)] 
Simplify hostname validation code

7 years agoValidate hostnames with punycode TLDs correctly
rl1987 [Sat, 17 Feb 2018 20:49:02 +0000 (21:49 +0100)] 
Validate hostnames with punycode TLDs correctly

7 years agoImprove handling of trailing dot
rl1987 [Mon, 12 Feb 2018 21:21:10 +0000 (22:21 +0100)] 
Improve handling of trailing dot

7 years agoTest TLD validation
rl1987 [Mon, 12 Feb 2018 21:20:45 +0000 (22:20 +0100)] 
Test TLD validation

7 years agoRefrain from including <ctype.h>
rl1987 [Mon, 12 Feb 2018 20:26:57 +0000 (21:26 +0100)] 
Refrain from including <ctype.h>

7 years agoAlso test bracket-less IPv6 string validation
rl1987 [Mon, 12 Feb 2018 20:16:38 +0000 (21:16 +0100)] 
Also test bracket-less IPv6 string validation

7 years agoCall strlen() once
rl1987 [Mon, 12 Feb 2018 20:08:17 +0000 (21:08 +0100)] 
Call strlen() once

7 years agoFix bracketed IPv6 string validation
rl1987 [Mon, 12 Feb 2018 18:52:47 +0000 (19:52 +0100)] 
Fix bracketed IPv6 string validation

7 years agoAdding changes file
rl1987 [Sun, 11 Feb 2018 17:16:51 +0000 (18:16 +0100)] 
Adding changes file

7 years agoDo not consider IP strings valid DNS names. Fixes #25055
rl1987 [Sun, 11 Feb 2018 15:39:23 +0000 (16:39 +0100)] 
Do not consider IP strings valid DNS names. Fixes #25055

7 years agoAllow IPv6 address strings to be used as hostnames in SOCKS5 requests
rl1987 [Sun, 11 Feb 2018 14:22:41 +0000 (15:22 +0100)] 
Allow IPv6 address strings to be used as hostnames in SOCKS5 requests

7 years agoMerge remote-tracking branch 'catalyst-github/bug25629-033' into maint-0.3.3
Nick Mathewson [Tue, 27 Mar 2018 22:25:41 +0000 (18:25 -0400)] 
Merge remote-tracking branch 'catalyst-github/bug25629-033' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 27 Mar 2018 22:25:31 +0000 (18:25 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2
Nick Mathewson [Tue, 27 Mar 2018 22:24:59 +0000 (18:24 -0400)] 
Merge remote-tracking branch 'catalyst-github/bug25629-032' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 27 Mar 2018 22:24:37 +0000 (18:24 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

"ours" merge to avoid earlier version of 25629 fix.

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Tue, 27 Mar 2018 22:23:53 +0000 (18:23 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoFix CID 1430932
Taylor Yu [Tue, 27 Mar 2018 00:29:59 +0000 (19:29 -0500)] 
Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.

7 years agoFix CID 1430932
Taylor Yu [Mon, 26 Mar 2018 23:05:16 +0000 (18:05 -0500)] 
Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.

7 years agoFix CID 1430932
Taylor Yu [Mon, 26 Mar 2018 22:51:50 +0000 (17:51 -0500)] 
Fix CID 1430932

Coverity found a null pointer reference in nodelist_add_microdesc().
This is almost certainly impossible assuming that the routerstatus_t
returned by router_get_consensus_status_by_descriptor_digest() always
corresponds to an entry in the nodelist.  Fixes bug 25629.

7 years agotest: Add unittest for the OR connection failure cache
George Kadianakis [Wed, 14 Feb 2018 11:40:42 +0000 (13:40 +0200)] 
test: Add unittest for the OR connection failure cache

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agorelay: Avoid connecting to down relays
David Goulet [Tue, 6 Feb 2018 20:40:17 +0000 (15:40 -0500)] 
relay: Avoid connecting to down relays

If we failed to connect at the TCP level to a relay, note it down and refuse
to connect again for another 60 seconds.

Fixes #24767

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'bug25213_033' into maint-0.3.3
Nick Mathewson [Tue, 27 Mar 2018 11:04:33 +0000 (07:04 -0400)] 
Merge branch 'bug25213_033' into maint-0.3.3

7 years agoMerge remote-tracking branch 'dgoulet/bug24904_033_01' into maint-0.3.3
Nick Mathewson [Mon, 26 Mar 2018 23:47:44 +0000 (19:47 -0400)] 
Merge remote-tracking branch 'dgoulet/bug24904_033_01' into maint-0.3.3

7 years agoMerge branch 'bug24903_029' into maint-0.3.3
Nick Mathewson [Mon, 26 Mar 2018 14:32:49 +0000 (10:32 -0400)] 
Merge branch 'bug24903_029' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 26 Mar 2018 14:29:29 +0000 (10:29 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Mon, 26 Mar 2018 14:29:29 +0000 (10:29 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Mon, 26 Mar 2018 14:29:29 +0000 (10:29 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoFix a unit test which was broken by the previous commit
Nick Mathewson [Mon, 26 Mar 2018 13:57:39 +0000 (09:57 -0400)] 
Fix a unit test which was broken by the previous commit

This test was expecting Tor to find and use routerinfos, but hadn't
cleared the UseMicrodescriptors flag.  Part of the fix for 25213.

7 years agoMake extend_info_from_node() more picky about node contents
Nick Mathewson [Mon, 26 Mar 2018 13:56:12 +0000 (09:56 -0400)] 
Make extend_info_from_node() more picky about node contents

This update is needed to make it consistent with the behavior of
node_awaiting_ipv6(), which doesn't believe in the addresses from
routerinfos unless it actually plans to use those routerinfos.

Fixes bug 25213; bugfix on b66b62fb7525cac1e1 in 0.3.3.1-alpha,
which tightened up the definition of node_awaiting_ipv6().

7 years agoWhen extending a circuit's path length, clear onehop_tunnel.
Nick Mathewson [Mon, 26 Mar 2018 13:17:50 +0000 (09:17 -0400)] 
When extending a circuit's path length, clear onehop_tunnel.

There was a nonfatal assertion in pathbias_should_count that would
trigger if onehop_tunnel was set, but the desired_path_length was
greater than 1.  This patch fixes that.  Fixes bug 24903; bugfix on
0.2.5.2-alpha.

7 years agoFix windows compilation warnings in hs_service.c
Nick Mathewson [Fri, 23 Mar 2018 21:47:56 +0000 (17:47 -0400)] 
Fix windows compilation warnings in hs_service.c

These were breaking jenkins builds.  Bugfix on 5804ccc9070dc54;
bug not in any released Tor.

7 years agoMerge branch 'bug25560_rebased_033' into maint-0.3.3
Nick Mathewson [Fri, 23 Mar 2018 15:18:20 +0000 (11:18 -0400)] 
Merge branch 'bug25560_rebased_033' into maint-0.3.3

7 years agotests: Automatically detect Rust crates to test and also pass --verbose.
Isis Lovecruft [Tue, 20 Mar 2018 20:46:19 +0000 (20:46 +0000)] 
tests: Automatically detect Rust crates to test and also pass --verbose.

 * FIXES #25560: https://bugs.torproject.org/25560.

7 years agochan: Use channel_is_client() in channel_do_open_actions()
David Goulet [Fri, 23 Mar 2018 14:11:37 +0000 (10:11 -0400)] 
chan: Use channel_is_client() in channel_do_open_actions()

Make sure we actually only report client channel to the geoip cache instead of
looking if it is a known relay. Looking if it is a known relay can be
unreliable because they come and go from the consensus.

Fixes #24904

Signed-off-by: David Goulet <dgoulet@torproject.org>