| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The `ForwardHandler` trait is meant for implementation-dependent
functions that are called from the implementation-agnostic
`ForwardReactor`. Previously `handle_unrecognized_cell()` was called
directly by the generic `ForwardReactor`, but that's no longer the case,
so it doesn't belong in the trait anymore.
This commit is just code motion. Best reviewed with `--color-moved`
|
| | | | |
| | | |
| | | |
| | | | |
Closes #2417
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This adds an initial set of tests for the circuit reactor.
We will, of course, add more tests as we continue working on the
implementation.
Closes #2353
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
This will soon be used by the relay tests too.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
This will be needed for the relay circuit reactor tests.
|
| | | | |
| | | |
| | | |
| | | | |
We'll soon need this for the relay reactor tests too.
|
| | | | | |
|
| |\ \ \ \
| |_|_|/
|/| | |
| | | |
| | | | |
Consensus Diff Generation
See merge request tpo/core/arti!3712
|
| | | | |
| | | |
| | | | |
Co-authored-by: Ian Jackson
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit modifies the dotline check to prevent generating lines that
consist of a single dot followed by an arbitrary amount of whitespace,
such as `.`, `. `, `. \t `, but not `. \t foo`.
It also adjusts the tests appropriately.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As pointed out by Diziet, our implementation does not reject dotlines
properly, due to our use of `trim_end()`. This commit fixes this, by
just checking for `line == ".\n"`. This is fine because we ensure Unix
line endings now anyways.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit changes the consdiff generation to enforce Unix line endings
and reject all other ones, including Windows line endings as well as no
line endings. In other words, it checks for `\n` while forbidding
`\r\n`.
It also renames the relevant error variant to reflect this change
better.
|
| | | | |
| | | |
| | | |
| | | | |
This is done to only get the first directory-signature.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit refactors the result composition by simply looping over
every line and checking whether it ends with a newline AND does not
consist of a single dot.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit changes the error variants that contain a line number to a
named variant with a field `lno: usize` to make it semantically clear,
that it is a line number.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Now that we no longer use .lines(), everything should work fine with
CRLF -- and it does. :-)
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit removes all manual line splits in the consdiff generation.
Instead, it now simply uses the primitives offered by imara-diff to
access the lines in the input itself.
Meanwhile, it also adds a check for missing newlines/assertions that all
lines are actually terminated by \n.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This commit replaces the use of lines with byte offsets for cutting of
the signatures.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This commit adds a compile time assertion that a u32 can always be
safely casted into a usize.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This commit adds a check that prevents gen_cons_diff from computing a
diff with a single dot line.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit refactors gen_ed_diff to have less code duplication by not
matching upon the hunk type once but by splitting it into two different
matches for the header and the body.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Mark a failed apply from a consensus diff we generate as a bug as this
should not happen. We must obviously always accept the consensus diffs
we produce.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This commit replaces repeated `result += &format!(...)` cruft with
`write!` calls and multi-line strings.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This commit moves "directory-signature" and "directory-signature " into
semantically meaningful constants.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit replaces the names crate with a simple hardcoded wordlist of
length 20, obtained from my systems wordlist.
Reason for that being that names triggers a cargo-audit failure.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit implements support for the consensus diff generation.
Unlike CTor, it does not use its own custom algorithm but rather uses an
implementation of Myers' algorithm from the `imara-diff` crate, which is
pretty performant and comparable to size and run time to CTor, while
being much simpler in the interfacing code.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This commit lno_for_error in ItemStream to lno because its value may not
always be used for error handling, such as in tor-consdiff.
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit adds the ParseError::new() method, which allows external
APIs to construct a ParseError, which is currently not possible due to
non-exhaustiveness, despite the member fields being public.
It is required for external applications using lower-level but public
parse2 APIs, such as ItemStream's.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
docs: Fix config file path on windows
Closes #2422
See merge request tpo/core/arti!3808
|
| | | |/
| |/| |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
hsservice: Remove obsolete "Limitations" section
See merge request tpo/core/arti!3812
|
| | | |/
| |/|
| | |
| | | |
These have been implemented for a while now.
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
tor-chanmgr: Don't `warn_report!` for failed connections
See merge request tpo/core/arti!3807
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`warn_report!` is useful when there's an error that we need to ignore
and can't propagate up the call stack. But here we're using
`warn_report!` while also returning the error in a
`Error::ChannelBuild`.
This is not great because:
1. The caller should warn if it wants to, since it will have the error
message and the proper context.
2. This code is doing something like happy eyeballs, which means we only
care that one connection succeeds, not if any fail.
One instance where this is problematic is when running Arti on a machine
without IPv6 support. If connecting to a relay with both an IPv4 and
IPv6 address, the IPv6 attempt will always fail. We don't want to warn
about every outgoing IPv6 connection failure when the IPv4 connection
succeeds.
|
| |\ \
| | |
| | |
| | |
| | | |
tor-guardmgr: Fix some duration string formatting
See merge request tpo/core/arti!3804
|
| | |/
| |
| |
| |
| |
| | |
Old text would say something like:
> Retrying in FormattedDuration(29.999861026s).
|
| |\ \
| |/
|/|
| |
| | |
tor-proto: Small miscellaneous changes on relay circuit reactor
See merge request tpo/core/arti!3809
|
| | |
| |
| |
| |
| | |
An `Arc<T>` is only `Send` if `T` is `Send + Sync`,
which is needed by the runtime.
|
| |/
|
|
|
| |
I plan to call this from
`crates/tor-proto/src/channel/reactor.rs`.
|
| |\
| |
| |
| |
| |
| |
| | |
Force use of standard hasher with weak_tables.
Closes #2418
See merge request tpo/core/arti!3801
|