aboutsummaryrefslogtreecommitdiff
path: root/tor-spec.txt
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-08-16 11:25:08 -0400
committerNick Mathewson <nickm@torproject.org>2021-08-16 11:25:08 -0400
commita681521b9d04135d2cff5d20b82927162c6626cc (patch)
tree425dc7dd155906a5a4a640b482c267a063db343d /tor-spec.txt
parentea4f88cc54e26b422db8828bed88ff156958d5f0 (diff)
downloadtorspec-a681521b9d04135d2cff5d20b82927162c6626cc.tar.gz
torspec-a681521b9d04135d2cff5d20b82927162c6626cc.zip
Clarify handling of dubious RELAY_END cell formats.
Diffstat (limited to 'tor-spec.txt')
-rw-r--r--tor-spec.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/tor-spec.txt b/tor-spec.txt
index a3a0ffd..4d9513e 100644
--- a/tor-spec.txt
+++ b/tor-spec.txt
@@ -1817,25 +1817,31 @@ see tor-design.pdf.
14 -- REASON_NOTDIRECTORY (Client sent RELAY_BEGIN_DIR to a
non-directory relay.)
+ [*] Older versions of Tor also send this reason when connections are
+ reset.
+
+ OPs and ORs MUST accept reasons not on the above list, since future
+ versions of Tor may provide more fine-grained reasons.
- For most reasons, the format is:
+ For most reasons, the format of RELAY_END is:
Reason [1 byte]
- For REASON_EXITPOLICY, the format is:
+ For REASON_EXITPOLICY, the format of RELAY_END is:
Reason [1 byte]
IPv4 or IPv6 address [4 bytes or 16 bytes]
TTL [4 bytes]
- OPs and ORs MUST accept reasons not on the above list, since future
- versions of Tor may provide more fine-grained reasons.
+ (If the TTL is absent, it should be treated as if it were 0xffffffff.
+ If the address is absent or is the wrong length, the RELAY_END message
+ should be processed anyway.)
Tors SHOULD NOT send any reason except REASON_MISC for a stream that they
have originated.
- [*] Older versions of Tor also send this reason when connections are
- reset.
+ Implementations SHOULD accept empty RELAY_END messages, and treat them
+ as if they specified REASON_MISC.
Upon receiving a RELAY_END cell, the recipient may be sure that no further
cells will arrive on that stream, and can treat such cells as a protocol