aboutsummaryrefslogtreecommitdiff
path: root/src/or/command.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-11-06 19:56:47 -0500
committerNick Mathewson <nickm@torproject.org>2012-11-06 21:23:46 -0500
commitbfffc1f0fc7616a25c32da2eb759dade4651659e (patch)
treeb31b3fe368816de2f5a001fbd975ead5aa1c2d9e /src/or/command.c
parentcd054ceadaa4723f076c7050160424b356b985ca (diff)
downloadtor-bfffc1f0fc7616a25c32da2eb759dade4651659e.tar
tor-bfffc1f0fc7616a25c32da2eb759dade4651659e.tar.gz
Allow a v4 link protocol for 4-byte circuit IDs.
Implements proposal 214. Needs testing.
Diffstat (limited to 'src/or/command.c')
-rw-r--r--src/or/command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/command.c b/src/or/command.c
index 39eccdf82..4007cd600 100644
--- a/src/or/command.c
+++ b/src/or/command.c
@@ -220,7 +220,10 @@ command_process_create_cell(cell_t *cell, channel_t *chan)
/* If the high bit of the circuit ID is not as expected, close the
* circ. */
- id_is_high = cell->circ_id & (1<<15);
+ if (chan->wide_circ_ids)
+ id_is_high = cell->circ_id & (1u<<31);
+ else
+ id_is_high = cell->circ_id & (1u<<15);
if ((id_is_high &&
chan->circ_id_type == CIRC_ID_TYPE_HIGHER) ||
(!id_is_high &&