| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Or rather, if we *didn't* negotiate 4, which is too old.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
|
| |
|
|
|
|
|
|
|
| |
We already actually send and negotiate the padding, since !657,
but we ought to negotiate a protocol version where that's not a
violation!
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2828354
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Making ChannelPaddingInstructions::default() accurately reflect the
initial state of the reactor's padding timer simplifies the code
somewhat.
(When padding is wanted, parameters are computed and inserted
explicitly, so the only change is that if we start out dormant, we
defer setting the timer parameters until necessary.)
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827249
|
| | |
|
| |
|
|
| |
Fixes "chanmgr configuration: Avoid sending needless initial update(s)"
|
| |
|
|
| |
This was for testing and is no longer needed.
|
| |
|
|
| |
This allow us to make a working cross-reference.
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826169
|
| | |
|
| | |
|
| |
|
|
| |
Run rustfmt; no other changes.
|
| |
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826167
This makes some lines too long; I will run rustfmt in a separate
commit for clarity.
|
| | |
|
| |
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826151
This gets rid of quite some Bug error paths.
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace Channel::note_usage with Channel::engage_padding_activities,
which unconditionally causes the channel to (start to) do netflow
padding things.
The condition now lives in chanmgr.
Addresses
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826094
|
| |
|
|
|
|
|
|
|
|
|
| |
Get rid of unneeded constructor.
We never need to use hardcoded reduced padding parameters during
negotiation cell construction. If we are using reduced padding
parameters, the layers which decide this have netparams to use.
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826092
|
| | |
|
| | |
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2825979
|
| | |
|
| |
|
|
|
| |
These have the unit in the type. Putting that in the field name too
is otiose.
|
| | |
|
| |
|
|
| |
To test the padding control we will want this.
|
| |
|
|
| |
Now it's not just cfg(test), but feature testing.
|
| |
|
|
|
| |
We are going to want this for through-the-layers padding control
testing.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is actually a general facility for inserting locally-generated
cells into the outgoing stream.
It doesn't seem to be possible to do this without adding an additional
condition check to the reactor, since we need to insert it into the
right place in the stream, giving it priority over data, and only
using it up if there was room in the output.
We don't engage this machinery yet, because nothing sets
special_outgoing.
|
| |
|
|
|
|
|
|
|
|
|
| |
Change ChannelsParams::initial_update to compare fields with their
default values, and, if they're the same as the default, not to
include them in the returned update.
And if that update is then empty, return None.
The overall effect is to avoid the call to chan.reparameterize if
we're using the builtin default parameters, which is usual.
|
| |
|
|
|
| |
We introduce the per-channel state that is used to keep track of
channel usage, and defer padding setup until it's wanted.
|
| |
|
|
|
| |
Right now this is just furniture. We're going to put channel padding
control state here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Channel padding depends on what the channel is being used for. We
therefore need to let the channel code know this information.
The implementation of the per-channel padding control logic will be in
the new note_usage function, which for now is simply a stub.
A future commit will introduce a `PaddingControlState` which lives in
the channel frontend; consult the doc comment for that type to see why
the plumbing through the channel manager terminates in the channel
frontend.
|
| |
|
|
| |
This is going to be able to fail in other ways too, sadly.
|
| |
|
|
|
| |
We're going to need this because the frontend is going to need to
defer some channel padding parameters updates.
|
| |
|
|
|
|
|
| |
Unfortunately, because we don't have derive-adhoc here yet, rustfmt
didn't get to notice that this comma was needed.
We are going to add field(s), so add the comma now.
|
| |
|
|
| |
The semantics of this are going to become a bit more subtle.
|
| |
|
|
|
| |
This exists so that we handle this case specially, as we will need to,
and so that we can represent disablement in a Parameters.
|
| |
|
|
|
| |
The channel manager is going to use this as part of constructing the
right cell for padding neogotiattion.
|
| |
|
|
| |
We're going to want this so that we can do reduced padding.
|
| |
|
|
|
|
|
| |
Much of this does not exist yet. It will do by the end of this
branch.
Expand a doc note for ChannelsParamsUpdates too.
|
| |
|
|
|
|
| |
Replaces 4 open-coded call sites.
I am going to add one more.
|
| |
|
|
|
|
|
| |
This is more standard. It also provides the ::build() method.
This isn't a config type, and build failures ought not to happen,
so we use Bug for the error.
|
| |
|
|
|
|
|
|
|
| |
We want to clarify that the tor-proto crate should only know _how_
its objects behave, not _why they behave that way_. (In other
words, we can have a "padding strategy" setting on a channel, but
not a "general usage" setting.)
Closes #531.
|
| | |
|
| |\
| |
| |
| | |
# Conflicts:
# crates/tor-netdir/semver.md
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | | |
Revise our handling of the zeroize trait
Closes #254
See merge request tpo/core/arti!655
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Everything that is a secret encryption key, or an input that is used
to produce a secret encryption key, has to get zeroized. And that's
all!
Closes #254.
|