| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
We now log connection attempts at debug!, and mark relay target
addresses as sensitive.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 suggested in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827246
|
| |
|
|
|
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827242
These texts were out of date; one of them still mentioned
`all_zeroes`.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Fixes "chanmgr configuration: Avoid sending needless initial update(s)"
|
| |
|
|
| |
This allow us to make a working cross-reference.
|
| |
|
|
| |
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.
|
| |
|
|
|
| |
Reported here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826166
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826164
|
| |
|
|
|
| |
It turns out that the TryFrom was infallible, which wasn't obvious
with the previous code structure.
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826093
|
| |
|
|
|
|
|
|
|
| |
The network consensus parameters use (0,0) to mean "no padding"
(which is not the same as (0,0) means in a PADDING_NEGOTIATE cell).
Representing "no padding" this way is actually quite convoluted and
un-Rustic. Ensure that we convert (0,0) to None, and do the primary
logic in Option.
|
| |
|
|
|
|
|
| |
Roughly as suggested in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826160
IMO this is less clear, because of the way it splits the logic up.
|
| | |
|
| |
|
|
| |
No functional change. (The error tyep was Void.)
|
| |
|
|
|
|
|
|
|
| |
This gets rid of many Result(). Many parameters are renamed.
Test cases of the now-impossible branch are removed.
Deleting the match from padding_parameters will come in a moment.
I've split off that commit since it has much whitespace noise.
for now, change the error type to Void.
|
| | |
|
| | |
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2825962
|
| | |
|
| |
|
|
|
| |
These have the unit in the type. Putting that in the field name too
is otiose.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Now all the information is plumbed to the right place, and we can
actually decide if we're sending padding.
Additionally, we conditionalise sending timing parameters on whether
padding is actually enabled, so in dormant mode we do not generate
updates (broadcast to all channels) just to reconfigure unused timing
parameters.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This arranges that the ChannelsParams we have retain, and which we
send to every newly created channel, actually has the right
parameters, even if they're not the default.
|
| |
|
|
|
|
|
| |
We're going to want to call this at startup as well as during
reconfigurations.
Code motion.
|
| |
|
|
|
|
| |
Now that the code that actually handles the netdir information can
cope with its lack, we can change the types of the various netdir
parameters and get rid of the foolish Bugs.
|
| |
|
|
|
|
|
|
|
|
| |
Now we actually honour the configuration variable.
However, when it is set to None, we lack proper handling. This will
be done bh turning None into 0,0 and then treating that as disabled.
There is a TODO for that.
Note that we *still* don't actually do or negotiate padding.
|
| |
|
|
|
| |
Whoops. This bug was completely masked by the fact that we don't
actually enable padding yet.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move some logic out of reconfigure_general into what was
update_padding_parameters_from_netdir, and rename that function.
We're going to want to call this twice, shortly...
* Move out the PaddingParametersBuilder
* Have it handle missing netdir, though we currently always pass Ok
* Have it handle the error cases
It still ignores the config for now.
No overall functional change.
"git show -b" may be a useful way to review the changes in what
becomes "padding_parameters".
|
| |
|
|
|
|
|
|
| |
Now that we make an extract from the incoming NetDir, we can move the
padding parameters computation to after we take the lock.
This will be necessary for it to be able to depend on the config and
dormancy, records of which are protected by the chanmgr lock.
|
| |
|
|
|
| |
This will allow the padding parameter computation to have access to
the config, which is within the inner lock.
|
| |
|
|
|
| |
The top-level global config is going to want to see whether its
machinations have the right effect.
|
| |
|
|
|
| |
Nothing actually reads this yet, and we also want a client-global
default for padding.
|
| |
|
|
|
| |
This commit is just the necessary plumbing. The config is currently
empty. We'll add something to it, for padding control, later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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 useful in a moment.
|
| |
|
|
| |
This is going to be able to fail in other ways too, sadly.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The chanmgr remembers the last dormancy state it was told.
We invent a chanmgr-specific Dormancy which the arti-client code knows
how to convert from the richer top-level dormant status. This avoids
having to have everyone know all the variants of the top-level state.
To call reconfigure_general, we must also obtain and plumb through a
netdir. Right now we must return an internal error if there is in
fact no netdir, because reconfigure_general does not yet cope with a
missing netdir.
Nothing actually *uses* the dormancy yet.
|