mirror repository of the tor core protocol in case of issues
Go to file
David Goulet 9c42cc1eb2 sendme: Refactor SENDME cell processing
This is a bit of a complicated commit. It moves code but also refactors part
of it. No behavior change, the idea is to split things up so we can better
handle and understand how SENDME cells are processed where ultimately it will
be easier to handle authenticated SENDMEs (prop289) using the intermediate
functions added in this commit.

The entry point for the cell arriving at the edge (Client or Exit), is
connection_edge_process_relay_cell() for which we look if it is a circuit or
stream level SENDME. This commit refactors that part where two new functions
are introduced to process each of the SENDME types.

The sendme_process_circuit_level() has basically two code paths. If we are a
Client (the circuit is origin) or we are an Exit. Depending on which, the
package window is updated accordingly. Then finally, we resume the reading on
every edge streams on the circuit.

The sendme_process_stream_level() applies on the edge connection which will
update the package window if needed and then will try to empty the inbuf if
need be because we can now deliver more cells.

Again, no behavior change but in order to split that code properly into their
own functions and outside the relay.c file, code modification was needed.

Part of #26840.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-04-29 12:17:57 -04:00
changes Merge branch 'maint-0.4.0' 2019-04-29 10:15:11 -04:00
contrib Remove contrib/dist/tor.sh.in 2019-04-17 13:15:02 +03:00
doc Merge branch 'maint-0.3.4' into maint-0.3.5 2019-04-19 12:00:41 +10:00
m4 Replace obsolete macros with modern equivalents 2016-12-23 10:34:11 -05:00
scripts Allow do_resolve() to be longer. 2019-04-24 14:15:18 -04:00
src sendme: Refactor SENDME cell processing 2019-04-29 12:17:57 -04:00
.appveyor.yml Merge remote-tracking branch 'tor-github/pr/733' into maint-0.4.0 2019-03-07 08:34:15 -05:00
.editorconfig Add .editorconfig to follow coding standards style 2018-06-17 19:24:40 -04:00
.gitignore Merge branch 'messaging_v3' into messaging_v3_merged 2019-03-26 20:13:49 -04:00
.gitlab-ci.yml Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
.gitmodules Update the .gitmodules to refer to project-level tor-rust-dependencies 2018-02-21 11:53:04 -05:00
.travis.yml Merge remote-tracking branch 'tor-github/pr/971' 2019-04-23 12:52:54 -04:00
acinclude.m4 Bump copyright date to 2019 2019-01-16 12:33:22 -05:00
autogen.sh Cleanup shellcheck warnings in autogen.sh 2019-01-18 13:49:30 +02:00
ChangeLog forward-port the 0.4.0.4-rc changelog 2019-04-11 17:06:19 -04:00
CODE_OF_CONDUCT Add CODE_OF_CONDUCT file 2018-07-05 11:22:33 +03:00
config.rust.in Make the rust tests link. 2018-07-31 19:46:00 -04:00
configure.ac Remove contrib/dist/tor.sh.in 2019-04-17 13:15:02 +03:00
CONTRIBUTING Add CODE_OF_CONDUCT file 2018-07-05 11:22:33 +03:00
Doxyfile.in Fix Doxyfile for 0.3.5 source tree moves 2018-11-14 07:45:55 -05:00
INSTALL Remove old instructions from INSTALL 2018-07-03 16:34:52 +03:00
LICENSE Bump copyright date to 2019 2019-01-16 12:33:22 -05:00
Makefile.am Merge branch 'maint-0.4.0' 2019-04-29 10:15:11 -04:00
Makefile.nmake Clean up the MVSC nmake files so they work again. 2014-09-09 10:27:05 -04:00
README doc: Put the release timeline link in README 2017-11-08 10:44:00 -05:00
ReleaseNotes Copy today's releases into changelogs and releasenotes. 2019-02-21 10:32:08 -05:00
warning_flags.in Try @warning_flags to avoid bloating verbose make logs 2018-12-21 10:00:23 -05:00

Tor protects your privacy on the internet by hiding the connection
between your Internet address and the services you use. We believe Tor
is reasonably secure, but please ensure you read the instructions and
configure it properly.

To build Tor from source:
        ./configure && make && make install

To build Tor from a just-cloned git repository:
        sh autogen.sh && ./configure && make && make install

Home page:
        https://www.torproject.org/

Download new versions:
        https://www.torproject.org/download/download.html

Documentation, including links to installation and setup instructions:
        https://www.torproject.org/docs/documentation.html

Making applications work with Tor:
        https://wiki.torproject.org/projects/tor/wiki/doc/TorifyHOWTO

Frequently Asked Questions:
        https://www.torproject.org/docs/faq.html


To get started working on Tor development:
        See the doc/HACKING directory.

Release timeline:
         https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/CoreTorReleases