diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-03-11 12:34:14 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-03-11 12:34:14 -0400 |
commit | fca578d9b56d7d80fc43f21b77153d7e5cad92d6 (patch) | |
tree | 8d46821132f9b445498109aca577f78db6917d30 /src/or/or.h | |
parent | 0196647970a91d2bdb052f38b3749dd0e99348e4 (diff) | |
download | tor-fca578d9b56d7d80fc43f21b77153d7e5cad92d6.tar.gz tor-fca578d9b56d7d80fc43f21b77153d7e5cad92d6.zip |
Increase link_proto field to 2 bytes
This should have been 2 bytes all along, since version numbers can
be 16 bits long. This isn't a live bug, since the call to
is_or_protocol_version_known in channel_tls_process_versions_cell
will reject any version number not in the range 1..4. Still, let's
fix this before we accidentally start supporting version 256.
Reported pseudonymously. Fixes bug 8062; bugfix on 0.2.0.10-alpha --
specifically, on commit 6fcda529, where during development I
increased the width of a version to 16 bits without changing the
type of link_proto.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h index c7d259853b..2fe36ba191 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1417,8 +1417,8 @@ typedef struct or_connection_t { unsigned int is_outgoing:1; unsigned int proxy_type:2; /**< One of PROXY_NONE...PROXY_SOCKS5 */ unsigned int wide_circ_ids:1; - uint8_t link_proto; /**< What protocol version are we using? 0 for - * "none negotiated yet." */ + uint16_t link_proto; /**< What protocol version are we using? 0 for + * "none negotiated yet." */ or_handshake_state_t *handshake_state; /**< If we are setting this connection * up, state information to do so. */ |