| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | |
| | | |
| | | |
| | | |
| | | | |
Code motion, plus adding a new impl block, to make the next commit
clearer.
|
| |\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | | |
tor-netdoc: Replace trivial string slice
See merge request tpo/core/arti!4143
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
We don't use this anymore, and it can lead to subtle bugs since we lose
the original channel message command.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of converting the `RelayEarly` message to a `Relay` message, we
add a new `RelayMaybeEarlyChanMsg` restricted message set that can hold
either.
Previously we were passing the wrong channel message command to
`decrypt_outbound()`, which would cause the decryption to fail for relay
crypto algorithms that use the command.
|
| | | | |
| | | |
| | | |
| | | | |
No functional change, just reformatting.
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit replaces the use of string slices with str::get() in all
document related code.
While this is not a perfect replacement for it, the relevant parts in
the code heavily depend upon the byte offsets returned by the low level
(legacy) parser where changing it would lead to a very big refactoring.
Nonetheless, this approach is better because returning a bug is better
than crashing.
|
| |\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
Introduce Intern<T>
Closes #2587
See merge request tpo/core/arti!4130
|
| | | |
| | |
| | |
| | | |
Removes a blocking comment and replaces it with a TODO DIRAUTH.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This is no longer required due to Deref
|
| | | |
| | |
| | |
| | | |
We can do so now directly.
|
| | | |
| | |
| | |
| | | |
If we derive it, we get access to Arc<T>, which is okay.
|
| | | |
| | |
| | |
| | | |
If one really wants to circumvent the guarantees ...
|
| | | |
| | |
| | |
| | | |
No functional change.
|
| | | |
| | |
| | |
| | | |
As a shorthand for T::intern_cache().intern(value).
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Let's leave this untouched for now as it is not urgent right now.
|
| | | |
| | |
| | |
| | | |
This commit wraps the port policies in an Intern.
|
| | | |
| | |
| | |
| | | |
This commit wraps the relay family in an Intern instead of an Arc.
|
| | | |
| | |
| | |
| | | |
Just a boilerplate implementation.
|
| | | |
| | |
| | |
| | |
| | | |
This commit implements ItemValueParseable and ItemArgumentParseable for
Intern<T> types. This should be sufficient for the time being.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Adds a derive-deftly based macro so that interfacing code can derive
GloballyInternable on structs in order to save redundant and repetitive
implementation calls.
|
| | | |
| | |
| | |
| | | |
We will make use of it in the next commit.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This defines a trait called GloballyInternable with a single method
`.intern_cache()` returning a static reference to the globally available
cache.
The next commit will add a derive-deftly based macro for it.
|
| | | |
| | |
| | |
| | | |
No functional change.
|
| | | |
| | |
| | |
| | |
| | | |
This commit modifies the codebase to actually return Intern<T> in
InternCache<T> and adds calls to .into() accordingly.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit introduces a new type for use with InternCache<T>:
Intern<T>.
Right now, we have the problem that this cache returns a general Arc<T>,
which leads to the issue that we quickly loose overview from where
values originate. With this type, it becomes clearer from where they
come.
In the next commit, we will adjust InternCache and the remaining
codebase accordingly.
|
| |\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | | |
proto: Add circ reactor scaffolding for rejecting pending streams
Closes #2590
See merge request tpo/core/arti!4139
|
| | | |
| | |
| | |
| | |
| | | |
See
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4139#note_3429586
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reworks `get_or_spawn_reactor()` to return `Error` instead of
`ReactorError`.
The main change here is that we now have a dedicated `Error::Spawn`
variant for `SpawnError`s, instead of mapping these to `ReactorError`
(which actually triggers a clean shutdown, which is not quite what we
want here).
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This doesn't need to contain the `CloseStreamBehavior` or
`TerminateReason`, because we always use the same ones.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
I realized the previous naming was ambiguous. Hopefully this makes it
clear that this `StreamEvent` triggers when the MPSC channel connecting
the reactor to the local application stream (for example the local TCP
connection of the stream, in the case of exit streams) is dropped.
|
| | | |
| | |
| | |
| | | |
This already returns `()` in the `Ok` case.
|
| | | |
| | |
| | |
| | | |
Closes #2590
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This will soon be reused for implementing `CtrlMsg::ClosePendingStream`.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will be sent by the FWD reactor.
Essentially, this going to be the final control message in the chain
`IncomingStream::reject()` ->
`RelayCirc::reject()` ->
`forward::CtrlCmd::ClosePendingStream`->
`HopMgr::close_pending()` ->
`stream::CtrlCmd::ClosePendingStream`
-> stream gets removed from the stream map, END sent
Part of #2590
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Closes #2590
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This replaces the `StreamMsg` `StreamReactor` sender with a new
`CtrlMsg` type. This `CtrlMsg` currently only has a `DeliverStreamMsg`
variant (which is the same as the old `StreamMsg` type), but will soon
grow another variant, for terminating a stream.
|