commit 751e528794cb1fa40212fbe5994bab5bccabc51a Author: Damian Johnson atagar@torproject.org Date: Sat Jun 23 15:22:34 2018 -0700
Reword hardcoded VERSIONS cell comment
Just pedantic twiddling on my part. I'd like to avoid citing tor-spec section numbers if possible since those might shift. --- stem/client/__init__.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/stem/client/__init__.py b/stem/client/__init__.py index de952996..a12959f7 100644 --- a/stem/client/__init__.py +++ b/stem/client/__init__.py @@ -88,14 +88,14 @@ class Relay(object): else: raise
- # per tor-spec.txt (section 3): - # "CIRCID_LEN is 2 for link protocol versions 1, 2, and 3. - # CIRCID_LEN is 4 for link protocol version 4 or higher. - # The first VERSIONS cell, and any cells sent before the - # first VERSIONS cell, always have CIRCID_LEN == 2 for backward - # compatibility." - - # thus we arbitrarily select link_protocol=2 to accomplish this + # To negotiate our link protocol the first VERSIONS cell is expected to use + # a circuit ID field size from protocol version 1-3 for backward + # compatibility... + # + # The first VERSIONS cell, and any cells sent before the + # first VERSIONS cell, always have CIRCID_LEN == 2 for backward + # compatibility. + conn.send(stem.client.cell.VersionsCell(link_protocols).pack(2)) response = conn.recv()
tor-commits@lists.torproject.org