diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2011-10-23 15:21:49 -0700 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-10-26 23:21:14 +0200 |
commit | a74e7fd40f1a77eb4000d8216bb5b80cdd8a6193 (patch) | |
tree | f1148867fb5627a0cbeba3bab4a65e589d0032cd /src/or/command.c | |
parent | c05bb53508f5fe3e570a285e6c9ead452ded0e43 (diff) | |
download | tor-a74e7fd40f1a77eb4000d8216bb5b80cdd8a6193.tar.gz tor-a74e7fd40f1a77eb4000d8216bb5b80cdd8a6193.zip |
Reject create cells on outgoing OR connections from bridges
Diffstat (limited to 'src/or/command.c')
-rw-r--r-- | src/or/command.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/command.c b/src/or/command.c index a17a3a6025..54f23bb0cd 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -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, |