diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-11-06 19:56:47 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-11-06 21:23:46 -0500 |
commit | bfffc1f0fc7616a25c32da2eb759dade4651659e (patch) | |
tree | b31b3fe368816de2f5a001fbd975ead5aa1c2d9e /src/or/cpuworker.c | |
parent | cd054ceadaa4723f076c7050160424b356b985ca (diff) | |
download | tor-bfffc1f0fc7616a25c32da2eb759dade4651659e.tar.gz tor-bfffc1f0fc7616a25c32da2eb759dade4651659e.zip |
Allow a v4 link protocol for 4-byte circuit IDs.
Implements proposal 214.
Needs testing.
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r-- | src/or/cpuworker.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 119892d710..a25a8a780a 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -31,7 +31,7 @@ #define MIN_CPUWORKERS 1 /** The tag specifies which circuit this onionskin was from. */ -#define TAG_LEN 10 +#define TAG_LEN 12 /** How many bytes are sent from the cpuworker back to tor? */ #define LEN_ONION_RESPONSE \ (1+TAG_LEN+ONIONSKIN_REPLY_LEN+CPATH_KEY_MATERIAL_LEN) @@ -75,7 +75,7 @@ tag_pack(char *tag, uint64_t chan_id, circid_t circ_id) /*XXXX RETHINK THIS WHOLE MESS !!!! !NM NM NM NM*/ /*XXXX DOUBLEPLUSTHIS!!!! AS AS AS AS*/ set_uint64(tag, chan_id); - set_uint16(tag+8, circ_id); + set_uint32(tag+8, circ_id); } /** Unpack <b>tag</b> into addr, port, and circ_id. @@ -84,7 +84,7 @@ static void tag_unpack(const char *tag, uint64_t *chan_id, circid_t *circ_id) { *chan_id = get_uint64(tag); - *circ_id = get_uint16(tag+8); + *circ_id = get_uint32(tag+8); } /** Called when the onion key has changed and we need to spawn new |