mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
added 'connected' cell type
see http://archives.seul.org/or/dev/Sep-2002/msg00018.html svn:r103
This commit is contained in:
@@ -22,6 +22,9 @@ void command_process_cell(cell_t *cell, connection_t *conn) {
|
||||
case CELL_SENDME:
|
||||
command_process_sendme_cell(cell, conn);
|
||||
break;
|
||||
case CELL_CONNECTED:
|
||||
command_process_connected_cell(cell, conn);
|
||||
break;
|
||||
default:
|
||||
log(LOG_DEBUG,"Cell of unknown type (%d) received. Dropping.", cell->command);
|
||||
break;
|
||||
@@ -297,3 +300,22 @@ void command_process_destroy_cell(cell_t *cell, connection_t *conn) {
|
||||
circuit_free(circ);
|
||||
}
|
||||
|
||||
void command_process_connected_cell(cell_t *cell, connection_t *conn) {
|
||||
circuit_t *circ;
|
||||
|
||||
circ = circuit_get_by_aci_conn(cell->aci, conn);
|
||||
|
||||
if(!circ) {
|
||||
log(LOG_DEBUG,"command_process_connected_cell(): unknown circuit %d. Dropping.", cell->aci);
|
||||
return;
|
||||
}
|
||||
|
||||
if(circ->n_conn != conn) {
|
||||
log(LOG_WARNING,"command_process_connected_cell(): cell didn't come from n_conn! (aci %d)",cell->aci);
|
||||
return;
|
||||
}
|
||||
|
||||
log(LOG_DEBUG,"command_process_connected_cell(): Received for aci %d.",cell->aci);
|
||||
connection_send_connected(circ->p_aci, circ->p_conn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user