summaryrefslogtreecommitdiff
path: root/tor-proto/src/circuit/sendme.rs
Commit message (Collapse)AuthorAgeFilesLines
* Add the "unreachable_pub" lint.Nick Mathewson2021-05-181-19/+19
| | | | | | This is a somewhat obnoxious change in its scope and requirements, but it makes it easier to understand what the real public and private parts of our APIs are.
* Add tests for correct incoming sendme handling.Nick Mathewson2021-03-221-0/+9
| | | | | | At this point I'm going to pause writing tor-proto tests for a little while and think about refactoring that could make these tests simpler. I'm doing way too much copy-paste here.
* tor-proto API: Use new_ref, not clone.Nick Mathewson2020-10-291-1/+0
| | | | | | Semantically, cloning a Channel or Circuit is actually increasing an internal reference count. We should name the functions to reflect that, to be more explicit about what we're doing.
* Remove a bunch of dbg! calls.Nick Mathewson2020-10-261-1/+0
|
* Use event_listener to find out about sendme replenishment.Nick Mathewson2020-10-261-30/+11
| | | | | Previously we would fail if a sendme window was exhausted and two tasks were waiting for it to be replenished at the same time.
* Resolve a bunch of XXXM3 comments in tor-proto.Nick Mathewson2020-10-261-26/+42
|
* tor-proto: Add tests for circuit::sendmeNick Mathewson2020-10-221-4/+134
|
* Mark must-resolve XXXX issues with "XXXXM3".Nick Mathewson2020-10-181-3/+3
| | | | | | | | | | "M3" is for "milestone 3" -- my target to fix the technical debt that I think will be bad if we ship even a pre-alpha with it. These aren't necessarily _all_ must-resolve, but they're all must-look-at. Closes #15
* Fix a couple of clippy warningsNick Mathewson2020-10-151-1/+1
|
* Revise DropMark defense to use a better type and match Tor's behavior.Nick Mathewson2020-10-131-0/+2
|
* Document all private members in tor-protoNick Mathewson2020-10-131-0/+11
|
* Another tweak to handling closing streamsNick Mathewson2020-10-131-0/+13
| | | | | | When a stream is closed and we haven't adjusted its state in the stream map yet, remember how many cells we've dropped so we can decrement them from the window later on.
* Try giving distinct handling to streams where END has been sentNick Mathewson2020-10-121-0/+3
| | | | | | This is the first step along the line to handling Tor issue tor#27557. We want to remember streams that we've ended and treat them as distinct from streams that have never existed
* Fix a pair of bugs in SENDME handling.Nick Mathewson2020-10-091-13/+10
| | | | | | | | | The problem is that we would count begin and end cells towards towards window totals when we are only supposed to count DATA cells, *and* that we would we send our sendmes one cell too early (or maybe late?). Closes #1.
* Move counts_towards_windows() code into circuit moduleNick Mathewson2020-10-091-0/+15
|
* Rename remaining get_ accessorsNick Mathewson2020-09-281-11/+11
|
* Fix some comments that reflected a misunderstanding in SENDMEsNick Mathewson2020-09-261-2/+2
| | | | | I had thought that the sendme authentication things used for onion services were 32-byte; they're still only 20.
* Make sendme authentication optional.Nick Mathewson2020-09-251-3/+8
| | | | | | | This code deviates from current tor in that it allows missing sendme authentications only when we know we're talking to an old relay, or when we don't know the version of the relay we're talking to.
* Improve documentation and lightly refactor SENDME codeNick Mathewson2020-09-251-35/+91
|
* Implement authenticated sendme output for circuit-level sendmes.Nick Mathewson2020-09-251-2/+7
| | | | This patch has a XXXXX kludge note in it.
* Try to get sendme crypto workingNick Mathewson2020-09-251-3/+7
| | | | | | | | There's a problem, though: this code assumes that tags are 20 bytes long whereas actually the tag type is part of the crypto layer info. So maybe in the long term we need to move the queue of tags from the send window into being part of the crypto layers.
* Incomplete implementation of circuit SENDME handling.Nick Mathewson2020-09-251-4/+12
| | | | | | This is incomplete because the cell crypto code doesn't actually expose tags yet, and because it demands tags unconditionally, without caring about the linkspec protocol version.
* Attempted implementation of stream sendme cellsNick Mathewson2020-09-251-13/+21
|
* Initial work on a sendme backend.Nick Mathewson2020-09-251-0/+151
Parameterized for authenticated/unauthenticated operation, and operation on circuits and streams.