summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-15bump to 0.3.3.5-rc-devNick Mathewson
2018-04-14bump to 0.3.3.5-rcNick Mathewson
2018-04-13Merge remote-tracking branch 'dgoulet/ticket25248_033_02' into maint-0.3.3Nick Mathewson
2018-04-13doc: Fix typo and clarify that DoS options are relay onlyMike Perry
2018-04-13doc: Move DOS options below SERVER optionsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-13doc: Improve DoS section of the man page tor.1David Goulet
Add to the Denial of Service section of the man page an explanation about the three different mitigation Tor has. Fixes #25248. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-12Refine extend_info_for_node's "enough info" check once again.Nick Mathewson
In d1874b433953f64, we adjusted this check so that we insist on using routerinfos for bridges. That's almost correct... but if we have a bridge that is also a regular relay, then we should use insist on its routerinfo when connecting to it as a bridge (directly), and be willing to use its microdescriptor when connecting to it elsewhere in our circuits. This bug is a likely cause of some (all?) of the (exit_ei == NULL) failures we've been seeing. Fixes bug 25691; bugfix on 0.3.3.4-alpha
2018-04-12Attempt to fix 32-bit clang builds, which broke with 31508a0abccfee1cdNick Mathewson
When size_t is 32 bits, the unit tests can't fit anything more than 4GB-1 into a size_t. Additionally, tt_int_op() uses "long" -- we need tt_u64_op() to safely test uint64_t values for equality. Bug caused by tests for #24782 fix; not in any released Tor.
2018-04-12Attempt to fix 32-bit builds, which broke with 31508a0abccfee1cdNick Mathewson
When size_t is 32 bits, doing "size_t ram; if (ram > 8GB) { ... }" produces a compile-time warning. Bug caused by #24782 fix; not in any released Tor.
2018-04-12Use less memory for MaxMemInQueues for machines with more than 8 GB of RAM.Alexander Færøy
This patch changes the algorithm of compute_real_max_mem_in_queues() to use 0.4 * RAM iff the system has more than or equal to 8 GB of RAM, but will continue to use the old value of 0.75 * RAM if the system have less than * GB of RAM available. This patch also adds tests for compute_real_max_mem_in_queues(). See: https://bugs.torproject.org/24782
2018-04-12Use STATIC for compute_real_max_mem_in_queuesAlexander Færøy
This patch makes compute_real_max_mem_in_queues use the STATIC macro, which allows us to test the function. See: https://bugs.torproject.org/24782
2018-04-12Make get_total_system_memory mockable.Alexander Færøy
This patch makes get_total_system_memory mockable, which allows us to alter the return value of the function in tests. See: https://bugs.torproject.org/24782
2018-04-11Merge branch 'bug25581_033_v2_asn_squashed' into maint-0.3.3Nick Mathewson
2018-04-11Rename HSLayer{2,3}Nodes to start without an underscore.Nick Mathewson
The old single-underscore names remain as a deprecated synonym. Fixes bug 25581; bugfix on 0.3.3.1-alpha.
2018-04-11Bug 24989: Count client hsdir gets towards MaxClientCircuitsPending.Mike Perry
We removed this by breaking them out from general in #13837.
2018-04-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-10Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-04-10Merge remote-tracking branch 'ahf-github/bugs/24854_029_2' into maint-0.2.9Nick Mathewson
2018-04-09Lift the list of default directory servers into their own file.Alexander Færøy
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
2018-04-06Ship all files needed to build Tor with rustNick Mathewson
Fixes bug 25732; bugfix on 0.3.3.2-alpha when strings.rs was introduced.
2018-04-05Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-05Merge branch 'ticket25296_032_squashed' into maint-0.3.2Nick Mathewson
2018-04-05PerConnBW{Rate,Burst} docs: do not say consensus param is always setNick Mathewson
Closes ticket 25296; bugfix on 0.2.2.7-alpha when these manpage entries were introduced.
2018-04-05Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-05Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-05Switch Travis to stable rustTaylor Yu
2018-04-05Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-05Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-05Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-04-05Merge branch 'maint-0.2.5' into maint-0.2.9Nick Mathewson
2018-04-05Merge remote-tracking branch 'dgoulet/bug25582_033' into maint-0.3.3Nick Mathewson
2018-04-05Merge branch 'bug25679_033_squashed' into maint-0.3.3Nick Mathewson
2018-04-05Fix the default for TOR_RUST_DEPENDENCIESNick Mathewson
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.
2018-04-05Update geoip and geoip6 to the April 3 2018 database.maint-0.2.5Karsten Loesing
2018-04-04man: Add a comment to anchor only optionDavid Goulet
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>
2018-04-04Merge branch 'bug21394_029_redux' into maint-0.3.3Nick Mathewson
2018-04-04Bug 21394 touchup: Increase DNS attempts to 3Dhalgren
Also don't give up on a resolver as quickly if multiple are configured.
2018-04-03add a missing wordNick Mathewson
2018-04-03Merge remote-tracking branch 'isis-github/bug24031_r5_squashed_033' into ↵Nick Mathewson
maint-0.3.3
2018-04-03changes: Add changes file for #24031.Isis Lovecruft
(cherry picked from commit 5a8cdec3f8617920f19e3ab7707233ad3f02424f)
2018-04-02rust: Fix ProtoSet and ProtoEntry to use the same DoS limits as C.Isis Lovecruft
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.
2018-04-02rust: Port all C protover_all_supported tests to Rust.Isis Lovecruft
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.
2018-04-02tests: Run all existing protover tests in both languages.Isis Lovecruft
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).
2018-04-02tests: Make inline comments in test_protover.c more accurate.Isis Lovecruft
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.
2018-04-02protover: Change protover_all_supported() to return only unsupported.Isis Lovecruft
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".
2018-04-02rust: Refactor protover::compute_for_old_tor().Isis Lovecruft
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`.
2018-04-02rust: Refactor Rust implementation of protover_is_supported_here().Isis Lovecruft
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()`.
2018-04-02rust: Refactor Rust impl of protover_compute_vote().Isis Lovecruft
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.
2018-04-02rust: Refactor Rust impl of protover_list_supports_protocol_or_later().Isis Lovecruft
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.