| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | | |
This is just code motion
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I am about to move this out of the `extend_and_forward()` test, because
I want to reuse it in the new `reject_stream()` test for checking that
the relay wrote an END cell to the stream.
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This test currently fails, because `IncomingStream::reject()` calls
`RelayCirc::close_pending()` under the hood, which isn't implemented
yet.
Part of #2590
|
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | | |
proto: log hop settings at trace upon client circuit opening.
See merge request tpo/core/arti!4076
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Use TimerangeBound for EdCert verify
See merge request tpo/core/arti!4136
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This updates semver.md with the breaking changes done to the Ed25519
certificate verification methods.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
No functional change.
|
| |/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit modifies the .verify() method for the Ed25519 embedded
certificates to wrap the result in a TimerangeBound, which inevitably
also changes the function signature in terms of arguments to no longer
accept SystemTime/Duration arguments.
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Try out deftly $impl feature, mostly in tor-config
See merge request tpo/core/arti!4095
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| |\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | | |
tor-netdoc: addr policy: Overhaul and fix /0 bug
Closes #2589
See merge request tpo/core/arti!4128
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
IMO it makes more sense to describe the semantics, than the syntax.
(This is a private type at the moment.)
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These are currently accepted. I'm not sure if we want to change that.
For now, add a test case.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
ipnet is a very widely used crate which is already in our dependency
stack.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
ADDR/0 is not the same as *, because it specifies the IP version.
Turning 0.0.0.0/0 into * is wrong, because * accepts IPv6 too.
Do this by abolishing the V4Star and V6Star variants. Sadly Rust
thinks that u32 << 32 is an overflow, not zero, so we do still need a
special case for a zero prefix length. (But we're about to delete
this code.)
Fixes #2589.
|
| | | | | |
| | | | |
| | | | |
| | | | | |
This is, also, wrong.
|