| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | |
| | | |
We introduce the per-channel state that is used to keep track of
channel usage, and defer padding setup until it's wanted.
|
| | | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | | |
This will be used for controlling channel padding, for now.
|
| | | |
| | |
| | |
| | | |
Reconfigurations might fail due to internal errors.
|
| | | |
| | |
| | |
| | |
| | | |
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 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.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
We're going to need to reuse this, so we can plumb the dormancy to
more places. Breaking it out avoids having repeat the initial
dormancy value in two places.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This function is going to become the code for controlling channels, in
general. (Including padding control.) Right now it doesn't do most
of the things.
In this commit:
* Change the prototype and the name now.
* Pass `()` for the dormancy and config, adding TODOs.
* Provide update_netdir method on AbstractChanMgr, and call that,
rather than having the ChanMgr go directly into the channel.
(That will enable us to test that `update_netdir` method
with test cases that don't have a complete ChanMgr.)
|
| | | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
| | |
| | |
| | |
| | | |
As proposed in
https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/77
|
| | | |
| | |
| | |
| | |
| | | |
This gets rid of some random hardcoded literals. We're going to want
to reuse this, too.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't really want the caller to pass ignored timeout parameters.
And this makes more semantic sense.
The stop constructor uses zero, which is what C Tor does. See
https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/76
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will be convenient for managing when to send these negotiation
messages.
While we're here, edit the comment to explain how this is (going to
be) used.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Much of this does not exist yet. It will do by the end of this
branch.
Expand a doc note for ChannelsParamsUpdates too.
|
| | | |
| | |
| | |
| | | |
This is going to change. Centralise it first.
|
| | | |
| | |
| | |
| | | |
This is going to change. Centralise it first.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |/
| |
| |
| |
| | |
The rustfmt-mandated different formatting of these two very similar
blocks is bad enough, without them being smooshed together.
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
Mark some circuit-building errors as "transient".
Closes #517
See merge request tpo/core/arti!676
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A "transient" error is one that does not indicate a true failure,
but rather an _expected_ need to retry. When we hit one of these,
we do not count it against the total number of permitted failures.
(We do impose a higher limit on "real failures plus transient
failures", though, to prevent infinite loops in the event of a
programming error.
Closes #517.
|
| |\ \
| | |
| | |
| | |
| | | |
Clarify `REASON_DONE`
See merge request tpo/core/arti!677
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
arti: Add support for process hardening
Closes #364
See merge request tpo/core/arti!672
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a compile-time feature with an associated configuration
flag, both enabled by default.
When it's turned on, hardening prevents the arti process from
dumping core or being attached to by low-privileged processes.
(This is a defense-in-depth measure, not an absolute way to prevent
attacks. For more information, see
[`secmem_proc`](https://docs.rs/secmem-proc/0.1.1/secmem_proc/).)
Closes #364.
|
| |\ \
| |/
|/|
| |
| | |
Fix nightly CI: allow print_stderr in rtt tests.
See merge request tpo/core/arti!673
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-rtcompat: Require that TcpStream be Send
See merge request tpo/core/arti!675
|
| | | | |
|
| |/ /
| |
| |
| | |
The lack of this seems to have been an oversight.
|
| |\ \
| |/
|/|
| |
| | |
fix error running check_licenses
See merge request tpo/core/arti!674
|
| |/
|
|
|
|
|
|
| |
--version was removed in a recent update
we use that to detected whether cargo-license is installed,
now use --help instead
|