| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
There is no `BackwardReactor` heading, because there isn't that much to
say about it (it moves `RELAY` cells in the opposite direction, and
rejects RELAY_EARLY and PADDING_NEGOTIATE).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
proto: Silently drop DESTROY/RELAY/CREATED cells on unknown circuits
Closes #2655
See merge request tpo/core/arti!4301
|
| | |
| |
| |
| | |
And say why it's okay to do so.
|
| | |
| |
| |
| |
| | |
These are no longer causing the channel reactor to shut down, so we need
to update this test accordingly.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we're a relay, we need to tolerate CREATED* with unrecognized
CircIds: for example, if we time out[^1] while trying to extend the circuit
by another hop, we will send a DESTROY to the extending hop, which can
race with the CREATED* response. In other words, a CREATED* cell
arriving on a closed circuit shouldn't be treated as a protocol
violation.
There are, however, a few cases where a CREATED* with an unknown CircId
*is* a protocol violation (and probably *should* cause us to close down
the channel):
* if the CREATED* is moving in the forward direction (towards the
exit), or
* if we have not previously sent a CREATE* with that particular CircId
As before, distinguishing these from the "closed circuit" case above
would involve some tricky logic, and the benefits are unclear, while the
downsides of closing a channel when we shouldn't have are significant.
It seems better to just drop these cells for now.
Closes #2655
[^1]: at the time of writing, we don't have timeouts for the circuit
extension logic, so what I've described here cannot actually happen
today. However, we *do* have a TODO for it, so the time outs I've
described here will be implemented at some point
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
An unrecognized circuit ID is not always a protocol violation, so we
shouldn't close down the channel if it happens.
This change makes the channel reactor drop DESTROY and RELAY cells with
unknown CircIds without closing down the channel. It affects both
clients and relays.
Instead of dropping these unconditionally, we could have implemented
some more sophisticated checks to distinguish the bogus CircIds from the
CircIds of closed circuits, but it's unclear if it's worth the added
complexity (see discussion in #2655).
This partly addresses #2646 (an unrecognized circuit ID shouldn't cause
us to close down the channel if we're a relay).
This commit partially undoes the changes from
4f567e4a9432b340c2799e600c8ceb3724ad3082,
which was originally intended to mitigate flooding attacks.
Part of #2655
|
| |\ \
| | |
| | |
| | |
| | | |
tor-proto: Some misc rust/clippy warning fixes
See merge request tpo/core/arti!4304
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes an `unfulfilled_lint_expectations` warning.
tor-proto conditionally sets a global `allow(unused)`, and if you have
an `expect(unused)` field within an `allow(unused)` struct, rust seems
to warn with 'unfulfilled_lint_expectations'.
https://github.com/rust-lang/rust/issues/160942
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This fixes a `clippy::large_enum_variant`.
|
| | |/ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
constructor
Replaces `TryFrom<SubprotocolRequest> for HandshakeSubprotocols`.
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| |
| |
| | |
tor-proto: Fix cc vegas counter updates on clock stall
Closes #2651
See merge request tpo/core/arti!4256
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pseudocode says:
```text
if next_cc_event:
next_cc_event--
if next_cwnd_event:
next_cwnd_event--
if clock_stalled_or_jumped:
inflight -= 'cc_sendme_inc'
return
```
but we were previously decrementing these after the return rather than
before.
|
| | |
| |
| |
| | |
We now have `add_relay_ent()` for this, so we can remove the TODO.
|
| | |
| |
| |
| |
| | |
I think this might have been c&p from the half-stream code ("hs" =
"half-stream"). "hc" ("half-circuit") seems like a better name.
|
| | |
| |
| |
| | |
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]>
|
| | |
| |
| |
| |
| | |
We previously interpreted the rate in the XON message as being Kbits per
second, but it's really Kbytes per second.
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| | |
tor-proto: Small improvements to circuit handshake tests
See merge request tpo/core/arti!4254
|
| | |
| |
| |
| |
| | |
Now that we read all of the cells from the connection inspector, we can
reuse the existing channel objects.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
These TODOs are for client issues, not relay isues.
|
| | |
| |
| |
| | |
Otherwise the new circuit gets closed immediately by the relay.
|
| |\ \
| |/
|/|
| |
| | |
tor-protover,tor-proto: Add and use a new `subprotocol_restricted_set` macro
See merge request tpo/core/arti!4241
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
These help to establish connected channel objects to be used for tests.
|