| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
We have decided that instead of "uniq_id" in logging, we'll use the
"<domaine>-[<type>]-id" syntax to indicate who is that unique ID.
This commit only renames circuit's unique ID to "circ_uniq_id".
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This commit only affects logging. Whenever possible, log both the UniqId
and CircId.
This also changes the log lines which is now "uniq_id=" and "circ_id="
as the UniqId is internal and circ_id (CircId) is protocol level.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A CircId is now a circ_id and a UniqId is a unique_id so we stop
confusing them in the code.
Furthermore, channel_id that are CircId are now circ_id. Channel IDs are
different and encoded internally into a UniqId.
This is the first step to clarify semantic before we change the logging
to log both unique ID and circ ID.
No behavior change.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
We decided the reactor is the wrong place to handle this.
See discussion in #2490
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This changes a debug log to have the same format as the corresponding
DESTROY-related log from the forward reactor.
Part of #2490
|
| | |
|
| |
|
|
| |
Part of #2490
|
| |
|
|
|
|
| |
To avoid copying the same information for every circuit,
as suggested by @opara in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3906#note_3399497
|
| |
|
|
|
| |
It doesn't make sense to do so, as pointed out by @opara in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3906#note_3398956
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3906#note_3397922
|
| |
|
|
|
|
|
| |
The relay reactor will now reject any EXTEND2 that tries to extend the
circuit to a hop that shares any identities with our previous hop.
Closes #2415
|
| |
|
|
|
| |
This will soon be used for preventing the circuit from being extended to
the previous hop (#2415).
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The EXTEND2 handling logic is fairly self-contained, so I'm moving it
outside of the `Forward` handler. This refactoring enables us to add
more context to the handler (i.e. the inbound channel identities needed
for #2415) without cluttering the `Forward` implementation.
I recommend reviewing this commit with `git diff --color-moved`.
|
| |
|
|
|
| |
I'm removing this so that we don't accidentally suppress new instances
of this warning.
|
| | |
|
| |
|
|
|
| |
This was previously creating a new CircuitAccount in
`new_outbound_circ()`, and then immediately dropping it.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
An `Arc<T>` is only `Send` if `T` is `Send + Sync`,
which is needed by the runtime.
|
| |
|
|
| |
Typos found with codespell
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This doesn't need to be part of the `ForwardHandler` trait anymore,
because the base reactor no longer calls it directly (instead
implementations are supposed to handle it internally).
No functional changes here, just code motion.
|
| |
|
|
| |
Closes #2339
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This pushes the RELAY/REALY_EARLY handling inside
`handle_forward_cell()`, which now decodes the relay cells and
* handles them internally, if they are unrecognized
(`handle_unrecognized_cell()`), or
* returns them back to the base reactor if they are recognized
(RELAY and RELAY_EARLY cells are handled the same way by the
base reactor)
|
| |
|
|
|
| |
Soon this function will be in charge of decoding the cell too, so it
will need a handle to the `HopMgr` (see `decode_relay_cell()`)
|
| |
|
|
|
|
|
|
| |
This is not yet implemented, so we should just return an error for now
(`todo!()` will cause a panic, shutting down the thread the reactor is
running on. We don't want this happening when we start manually testing
our WIP impl, because depending on which thread it happens on, it can
make the entire relay process unusable).
|
| |
|
|
| |
Closes #2345
|
| |
|
|
| |
This will tell the base `BackwardReactor` how to handle the cell.
|
| | |
|
| |
|
|
|
| |
See discussion at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3648#note_3339863
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Implements this part of the spec:
```
To tear down a circuit completely, a relay or client sends a DESTROY
cell to the adjacent nodes on that circuit, using the appropriate
direction’s circID.
```
|
| |
|
|
|
| |
This doesn't need to be async, as it delegates the handling to a
background task.
|
| |
|
|
|
|
|
|
| |
To handle EXTEND2, the relay `ForwardHandler` impl spawns a background
task, which reports back the result via the `CircEvent` MPSC stream.
This stream is polled from the `ForwardReactor` main loop, and each
`CircEvent` is passed back to `ForwardHandler::handle_event()` for
handling.
|
| |
|
|
| |
Users reading the log won't necessarily know what a "forward channel" is.
|
| | |
|
| |
|
|
|
| |
This will enable us to obtain implementation-dependent asynchronous
events (such as the outcome of an extend handshake).
|
| |
|
|
| |
To match the `ChannelProvider::get_or_launch()` function signature.
|
| |
|
|
|
|
| |
We need the unique_id here, because the Forward handler will soon start
using the `ChannelProvider::get_or_launch()` to launch outbound
channels, which takes the reactor unique_id as an argument.
|
| |
|
|
|
|
| |
The channel provider is relay-specific, so I am moving it to the relay
`ForwardHandler` implementation. This enables us to get rid of some of
the feature gating from the generic reactor.
|
| |
|
|
|
|
|
|
|
|
| |
We settled on
* `inbound_chan{tx, rx}`, for the inbound channel (the channel towards
the guard, if we are a client, or towards the client if we are a
relay)
* `outbound_chan{tx, rx}`, for the outbound channel (the channel
towards the exit, if we are a middle relay)
|