mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Reject create cells on outgoing OR connections from bridges
This commit is contained in:
committed by
Sebastian Hahn
parent
c05bb53508
commit
a74e7fd40f
+5
-2
@@ -219,6 +219,7 @@ static void
|
||||
command_process_create_cell(cell_t *cell, or_connection_t *conn)
|
||||
{
|
||||
or_circuit_t *circ;
|
||||
or_options_t *options = get_options();
|
||||
int id_is_high;
|
||||
|
||||
if (we_are_hibernating()) {
|
||||
@@ -230,9 +231,11 @@ command_process_create_cell(cell_t *cell, or_connection_t *conn)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!server_mode(get_options())) {
|
||||
if (!server_mode(options) ||
|
||||
(!public_server_mode(options) && conn->is_outgoing)) {
|
||||
log_fn(LOG_PROTOCOL_WARN, LD_PROTOCOL,
|
||||
"Received create cell (type %d) from %s:%d, but we're a client. "
|
||||
"Received create cell (type %d) from %s:%d, but we're connected "
|
||||
"to it as a client. "
|
||||
"Sending back a destroy.",
|
||||
(int)cell->command, conn->_base.address, conn->_base.port);
|
||||
connection_or_send_destroy(cell->circ_id, conn,
|
||||
|
||||
Reference in New Issue
Block a user