checkpoint: revamp relay cell packaging and handling

include the infrastructure for inserting padding cells when there's
a relay-recognized conflict, but it does not work currently.


svn:r958
This commit is contained in:
Roger Dingledine
2003-12-23 07:45:31 +00:00
parent 070b26d987
commit f3f1645c8a
5 changed files with 235 additions and 80 deletions
+4 -6
View File
@@ -168,16 +168,14 @@ static void command_process_relay_cell(cell_t *cell, connection_t *conn) {
}
if(cell->circ_id == circ->p_circ_id) { /* it's an outgoing cell */
cell->circ_id = circ->n_circ_id; /* switch it */
if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_OUT, conn->cpath_layer) < 0) {
log_fn(LOG_WARN,"circuit_deliver_relay_cell (forward) failed. Closing.");
if(circuit_receive_relay_cell(cell, circ, CELL_DIRECTION_OUT) < 0) {
log_fn(LOG_WARN,"circuit_receive_relay_cell (forward) failed. Closing.");
circuit_close(circ);
return;
}
} else { /* it's an ingoing cell */
cell->circ_id = circ->p_circ_id; /* switch it */
if(circuit_deliver_relay_cell(cell, circ, CELL_DIRECTION_IN, NULL) < 0) {
log_fn(LOG_WARN,"circuit_deliver_relay_cell (backward) failed. Closing.");
if(circuit_receive_relay_cell(cell, circ, CELL_DIRECTION_IN) < 0) {
log_fn(LOG_WARN,"circuit_receive_relay_cell (backward) failed. Closing.");
circuit_close(circ);
return;
}