[tor-dev] Support for clients using shutdown(SHUT_WR)

Rob Jansen rob.g.jansen at nrl.navy.mil
Wed Apr 10 18:27:06 UTC 2019


Hello!

I'm in the process of re-writing Shadow's traffic generation tool called tgen [0], which now depends on shutdown() for two communicating tgen nodes to inform each other that they have no more to send (i.e. to perform graceful connection shutdowns). The shutdown() functionality is useful now that tgen uses Markov models to generate more realistic Tor traffic [1].

Currently, it appears that when the tor client receives a FIN on the AP connection (because the tgen client calls shutdown(SHUT_WR)), the tor client sends a RELAY_END cell to the exit relay to instruct it to close() the exit TCP connection to the server.

The behavior I expected was something more like what is described in tor-spec in Section 6.3 (search for "RELAY_FIN") [2], where the tor client sends a RELAY_FIN cell to the exit to instruct the exit to perform a shutdown(SHUT_WR) on the exit TCP connection to the server.

Is there any plan to support shutdown(SHUT_WR) using RELAY_FIN cells now that Tor is itself using shutdown()? (I didn't see any tickets about it after a brief search.)

Thanks!

Peace, love, and positivity,
Rob

[0] https://github.com/shadow/tgen
[1] https://tmodel-ccs2018.github.io/
[2] https://gitweb.torproject.org/torspec.git/tree/tor-spec.txt


More information about the tor-dev mailing list