diff options
author | Roger Dingledine <arma@torproject.org> | 2003-05-02 21:29:25 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-05-02 21:29:25 +0000 |
commit | 96759a609e65edf0ba48471242a94b63023fba3c (patch) | |
tree | dd8c0837888ccd5cd28ae009b1d1427a70f596db /src/or/onion.c | |
parent | bb75b142187798b3599b76d53e1faf581676d30a (diff) | |
download | tor-96759a609e65edf0ba48471242a94b63023fba3c.tar.gz tor-96759a609e65edf0ba48471242a94b63023fba3c.zip |
streams are now 8 bytes, and are recognized by intermediate hops
the OP only crypts the appropriate number of times depending on which
layer (hop on the path) it's for/from.
svn:r262
Diffstat (limited to 'src/or/onion.c')
-rw-r--r-- | src/or/onion.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/onion.c b/src/or/onion.c index fc50279c7a..87c42ee2fc 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -141,13 +141,14 @@ void onion_pending_remove(circuit_t *circ) { } -struct relay_queue_t *relay_queue_add(struct relay_queue_t *list, cell_t *cell) { +struct relay_queue_t *relay_queue_add(struct relay_queue_t *list, cell_t *cell, crypt_path_t *layer_hint) { struct relay_queue_t *tmpd, *newd; newd = malloc(sizeof(struct relay_queue_t)); memset(newd, 0, sizeof(struct relay_queue_t)); newd->cell = malloc(sizeof(cell_t)); memcpy(newd->cell, cell, sizeof(cell_t)); + newd->layer_hint = layer_hint; if(!list) { return newd; @@ -167,7 +168,7 @@ void onion_pending_relay_add(circuit_t *circ, cell_t *cell) { for(tmpo=ol_list; tmpo; tmpo=tmpo->next) { if(tmpo->circ == circ) { - tmpo->relay_cells = relay_queue_add(tmpo->relay_cells, cell); + tmpo->relay_cells = relay_queue_add(tmpo->relay_cells, cell, NULL); return; } } |