mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 13:53:31 +01:00
Don't extend introduction circuits indefinitely.
Doing so could run you out of relay_early cells and give you a senselessly long circuit. Patch from Karsten; may fix bug 878. svn:r18459
This commit is contained in:
parent
32aaa16100
commit
91fece7be2
@ -10,6 +10,8 @@ Changes in version 0.2.1.13-????? - 2009-0?-??
|
|||||||
stop preferring the exit and try again. This situation may not be
|
stop preferring the exit and try again. This situation may not be
|
||||||
possible now, but will probably become feasible with proposal 158.
|
possible now, but will probably become feasible with proposal 158.
|
||||||
Spotted by rovv. Fixes another case of bug 752.
|
Spotted by rovv. Fixes another case of bug 752.
|
||||||
|
- Don't re-extend introduction circuits if we ran out of RELAY_EARLY
|
||||||
|
cells. Bugfix on 0.2.1.3-alpha. Fixes more of bug 878.
|
||||||
|
|
||||||
o Minor features:
|
o Minor features:
|
||||||
- On Linux, use the prctl call to re-enable core dumps when the user
|
- On Linux, use the prctl call to re-enable core dumps when the user
|
||||||
@ -160,7 +162,7 @@ Changes in version 0.2.1.10-alpha - 2009-01-06
|
|||||||
guessing the wrong parts of our address as our address.
|
guessing the wrong parts of our address as our address.
|
||||||
- Do not cannibalize a circuit if we're out of RELAY_EARLY cells to
|
- Do not cannibalize a circuit if we're out of RELAY_EARLY cells to
|
||||||
send on that circuit. Otherwise we might violate the proposal-110
|
send on that circuit. Otherwise we might violate the proposal-110
|
||||||
limit. Bugfix on 0.2.1.3-alpha. Partial fix for Bug 878. Diagnosis
|
limit. Bugfix on 0.2.1.3-alpha. Partial fix for bug 878. Diagnosis
|
||||||
thanks to Karsten.
|
thanks to Karsten.
|
||||||
- When we're sending non-EXTEND cells to the first hop in a circuit,
|
- When we're sending non-EXTEND cells to the first hop in a circuit,
|
||||||
for example to use an encrypted directory connection, we don't need
|
for example to use an encrypted directory connection, we don't need
|
||||||
|
@ -274,13 +274,31 @@ rend_client_introduction_acked(origin_circuit_t *circ,
|
|||||||
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
|
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
log_info(LD_REND,
|
if (circ->remaining_relay_early_cells) {
|
||||||
"Got nack for %s from %s. Re-extending circ %d, "
|
log_info(LD_REND,
|
||||||
"this time to %s.",
|
"Got nack for %s from %s. Re-extending circ %d, "
|
||||||
escaped_safe_str(circ->rend_data->onion_address),
|
"this time to %s.",
|
||||||
circ->build_state->chosen_exit->nickname, circ->_base.n_circ_id,
|
escaped_safe_str(circ->rend_data->onion_address),
|
||||||
extend_info->nickname);
|
circ->build_state->chosen_exit->nickname,
|
||||||
result = circuit_extend_to_new_exit(circ, extend_info);
|
circ->_base.n_circ_id, extend_info->nickname);
|
||||||
|
result = circuit_extend_to_new_exit(circ, extend_info);
|
||||||
|
} else {
|
||||||
|
log_info(LD_REND,
|
||||||
|
"Got nack for %s from %s. Building a new introduction "
|
||||||
|
"circuit, this time to %s.",
|
||||||
|
escaped_safe_str(circ->rend_data->onion_address),
|
||||||
|
circ->build_state->chosen_exit->nickname,
|
||||||
|
extend_info->nickname);
|
||||||
|
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED);
|
||||||
|
if (!circuit_launch_by_extend_info(CIRCUIT_PURPOSE_C_INTRODUCING,
|
||||||
|
extend_info,
|
||||||
|
CIRCLAUNCH_IS_INTERNAL)) {
|
||||||
|
log_warn(LD_REND, "Building introduction circuit failed.");
|
||||||
|
result = -1;
|
||||||
|
} else {
|
||||||
|
result = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
extend_info_free(extend_info);
|
extend_info_free(extend_info);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user