diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/or/command.c | 4 | ||||
-rw-r--r-- | src/or/main.c | 2 | ||||
-rw-r--r-- | src/or/nodelist.c | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/or/command.c b/src/or/command.c index 9b3ff16f2..105bdc637 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -376,7 +376,7 @@ command_process_created_cell(cell_t *cell, channel_t *chan) return; } - if (circ->n_circ_id != cell->circ_id) { + if (circ->n_circ_id != cell->circ_id || circ->n_chan != chan) { log_fn(LOG_PROTOCOL_WARN,LD_PROTOCOL, "got created cell from Tor client? Closing."); circuit_mark_for_close(circ, END_CIRC_REASON_TORPROTOCOL); @@ -461,6 +461,7 @@ command_process_relay_cell(cell_t *cell, channel_t *chan) } if (!CIRCUIT_IS_ORIGIN(circ) && + chan == TO_OR_CIRCUIT(circ)->p_chan && cell->circ_id == TO_OR_CIRCUIT(circ)->p_circ_id) direction = CELL_DIRECTION_OUT; else @@ -529,6 +530,7 @@ command_process_destroy_cell(cell_t *cell, channel_t *chan) circ->received_destroy = 1; if (!CIRCUIT_IS_ORIGIN(circ) && + chan == TO_OR_CIRCUIT(circ)->p_chan && cell->circ_id == TO_OR_CIRCUIT(circ)->p_circ_id) { /* the destroy came from behind */ circuit_set_p_circid_chan(TO_OR_CIRCUIT(circ), 0, NULL); diff --git a/src/or/main.c b/src/or/main.c index a3be9a20d..3c661cd12 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1247,7 +1247,7 @@ run_scheduled_events(time_t now) now + DESCRIPTOR_FAILURE_RESET_INTERVAL; } - if (options->UseBridges) + if (options->UseBridges && !options->DisableNetwork) fetch_bridge_descriptors(options, now); /* 1b. Every MAX_SSL_KEY_LIFETIME_INTERNAL seconds, we change our diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 09232f9f9..8f870816d 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -1249,10 +1249,12 @@ router_set_status(const char *digest, int up) if (!up && node_is_me(node) && !net_is_disabled()) log_warn(LD_NET, "We just marked ourself as down. Are your external " "addresses reachable?"); + + if (bool_neq(node->is_running, up)) + router_dir_info_changed(); + node->is_running = up; } - - router_dir_info_changed(); } /** True iff, the last time we checked whether we had enough directory info |