Commit Graph

161 Commits

Author SHA1 Message Date
Nick Mathewson e4baf164dd Small cleanups and tweaks to same_subnet code. 2021-08-05 15:16:03 -04:00
Nick Mathewson 3bc0a03848 Merge remote-tracking branch 'origin/mr/45' 2021-08-05 14:59:34 -04:00
Smitty 3100a6a6ae Support EnforceDistinctSubnets
Relays on the same IPv4 /16 or IPv6 /32 are treated as being in the same
family.
2021-08-01 19:01:06 -04:00
rls 297ca28170 Revert spelling change; "recognised" is valid 2021-07-31 18:21:18 +02:00
rls 51d91508f7 Fix typos and other spelling mistakes 2021-07-31 18:02:35 +02:00
Daniel Eades ed14a7fcf2 address some possibly slightly controversial lints 2021-07-21 07:27:26 +01:00
Daniel Eades d23256074e address a bunch of hopefully uncontroversial lints 2021-07-20 22:59:59 +01:00
Nick Mathewson 379c28b2a8 Implement consensus parameters related to circuit timeout inference. 2021-07-19 12:25:26 -04:00
Trinity Pointard ed0b51b557 cleanliness 2021-07-10 03:10:19 +02:00
Trinity Pointard 676577c184 make ipv[46]_policy take into account BadExit
they now report an empty policy for BadExit relays
2021-07-10 02:38:41 +02:00
Nick Mathewson 3a38d4ff7b Rename "send_me_*" to "sendme_*" 2021-07-06 12:34:02 -04:00
Nick Mathewson 1c21295d19 Merge remote-tracking branch 'origin/mr/34' 2021-06-27 14:30:49 -04:00
Nick Mathewson 2df9b0e921 Bump version dependencies to 0.0.0 2021-06-24 09:27:17 -04:00
Nick Mathewson b774360755 Remove "publish = false" 2021-06-24 07:04:26 -04:00
YUAN LYU 92dbf20a76 Add clippy warn needless pass by value 2021-06-21 23:27:19 -04:00
YUAN LYU b830e81b7f Add clippy warn needless borrow 2021-06-21 21:34:40 -04:00
Nick Mathewson e6faeaa1f8 Fix some warnings about needless & from nightly clippy 2021-06-18 07:19:24 -04:00
Nick Mathewson 9310273448 Remove some (but not all) needless dependencies. 2021-06-17 09:09:43 -04:00
Nick Mathewson 321fd79632 Notes about badexit flag and opportunities for error 2021-06-16 15:10:26 -04:00
Nick Mathewson a9086fd139 Missing feature dependency. 2021-06-16 11:40:19 -04:00
Nick Mathewson d3f27716d9 Tests for circmgr::usage 2021-06-16 11:36:50 -04:00
Nick Mathewson b6da4bb11a Expose the "construct_network()" function in tor-netdir.
This function has been used for testing tor-netdir, but it will also
be useful for testing path selection in tor-cirmgr as well.

I've put it behind a "testing" feature, since it shouldn't really be
used by most applications.
2021-06-16 10:58:48 -04:00
Nick Mathewson 2102d2e2b5 Add noop_method_call warning.
This would have saved ahf and me a lot of confusion in debugging a
situation where we were cloning a reference of a type that didn't
implement Clone.
2021-05-27 14:32:29 -04:00
Nick Mathewson 7f681ac824 Use the "typos" tool to fix some spelling 2021-05-26 19:18:35 -04:00
Nick Mathewson 745c90e92c Enable cargo_common_metadata warning. 2021-05-25 15:42:47 -04:00
Nick Mathewson cf59e9be77 Add automatically generated README.md files to each crate. 2021-05-25 15:41:23 -04:00
Nick Mathewson 63e4db3ceb tor-netdir no longer uses caret. 2021-05-25 11:25:19 -04:00
Nick Mathewson 88e711b282 Re-add a percentage type wrapper.
It turns out that when we don't have a percentage type associated
with a value, it is far too easy to forget to divide by 100 before
using it as a fraction.
2021-05-25 11:21:11 -04:00
Nick Mathewson 6a8cce95f0 fixup! Revert change to type of NetParams value. 2021-05-25 11:00:45 -04:00
Nick Mathewson 3e0a235fba Remove a needless lifetime. 2021-05-25 10:58:55 -04:00
Nick Mathewson 89bdf6f1d8 Remove unused derive_more. 2021-05-25 10:58:13 -04:00
Nick Mathewson 09b67f2fca Remove the no-longer-used params::Error 2021-05-25 10:11:09 -04:00
Nick Mathewson fa991bb410 Documentation fix. 2021-05-25 10:10:05 -04:00
Nick Mathewson bd06558775 It is not an error to see an unrecognized parameter. 2021-05-25 10:04:37 -04:00
Nick Mathewson 0890f70161 Fix clippy warnings by marking types non-exhaustive. 2021-05-25 09:49:31 -04:00
Nick Mathewson 2af2ec075f Revert change to type of NetParams value.
This truly is an i32, not a strings: it is a specified requirement
in parsing consensus documents.
2021-05-25 09:47:49 -04:00
Nick Mathewson e8214d1df1 Use macros and types to improve handling of Netdir parameters.
(Squashed from typed-netdir-params)
2021-05-25 09:16:59 -04:00
Nick Mathewson 9dbf78967c More docs on tor-netdir. 2021-05-24 14:30:08 -04:00
Alexander Færøy 9ee679dd8d Make netdir's Relay type derive "Clone". 2021-05-20 16:25:14 +00:00
Nick Mathewson ce6702a147 Give every Cargo.toml a repository field 2021-05-19 14:56:09 -04:00
Nick Mathewson 712e6ec23c Fill in "package.categories" on all Cargo.toml 2021-05-19 14:50:39 -04:00
Nick Mathewson 26689412c0 fix a clippy warning about pick_weighted. 2021-05-19 14:42:44 -04:00
Nick Mathewson 9e7de1a692 Prefer "relay" over "node" in most circumstances. 2021-05-18 11:04:44 -04:00
Nick Mathewson e2139e8afc Prefer "relay" over "router" in docs and APIs. 2021-05-18 10:58:12 -04:00
Nick Mathewson c10de0c3be Add builders for authority and fallback objects. 2021-05-10 15:40:52 -04:00
Nick Mathewson 28b1c1b9ce tor_netdir: tests on relay picking and more 2021-05-10 09:51:05 -04:00
Nick Mathewson 2a3fc3f5e6 netdir: Add real tests for frac_for_role().
Also fix a bug in calculating have_enough_paths(): we were assuming
the wrong behavior for weight_for_role().
2021-05-10 08:45:18 -04:00
Nick Mathewson 609d02a96c netdir: remove unused From implementation. 2021-05-10 07:23:52 -04:00
Nick Mathewson fa038e5e21 Add some tests to tor-netdir. 2021-05-07 15:13:32 -04:00
Nick Mathewson 55fa952e37 More tests for tor-netdir::weight 2021-05-07 08:44:13 -04:00