mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 07:07:52 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
This commit is contained in:
commit
bc2d9357f5
2 changed files with 19 additions and 12 deletions
13
changes/bug4212
Normal file
13
changes/bug4212
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
o Major bugfixes:
|
||||||
|
|
||||||
|
- Don't launch a useless circuit after failing to use one of a
|
||||||
|
hidden service's introduction points. Previously, we would
|
||||||
|
launch a new introduction circuit, but not set the hidden
|
||||||
|
service which that circuit was intended to connect to, so it
|
||||||
|
would never actually be used. A different piece of code would
|
||||||
|
then create a new introduction circuit correctly, so this bug
|
||||||
|
was harmless until it caused an assertion in the client-side
|
||||||
|
part of the #3825 fix to fail. Bug reported by katmagic and
|
||||||
|
found by Sebastian Hahn. Bugfix on 0.2.1.13-alpha; fixes bug
|
||||||
|
4212.
|
||||||
|
|
|
@ -81,8 +81,8 @@ rend_client_send_establish_rendezvous(origin_circuit_t *circ)
|
||||||
/** Extend the introduction circuit <b>circ</b> to another valid
|
/** Extend the introduction circuit <b>circ</b> to another valid
|
||||||
* introduction point for the hidden service it is trying to connect
|
* introduction point for the hidden service it is trying to connect
|
||||||
* to, or mark it and launch a new circuit if we can't extend it.
|
* to, or mark it and launch a new circuit if we can't extend it.
|
||||||
* Return 0 on success. Return -1 and mark the introduction
|
* Return 0 on success or possible success. Return -1 and mark the
|
||||||
* circuit on failure.
|
* introduction circuit for close on permanent failure.
|
||||||
*
|
*
|
||||||
* On failure, the caller is responsible for marking the associated
|
* On failure, the caller is responsible for marking the associated
|
||||||
* rendezvous circuit for close. */
|
* rendezvous circuit for close. */
|
||||||
|
@ -107,17 +107,11 @@ rend_client_reextend_intro_circuit(origin_circuit_t *circ)
|
||||||
result = circuit_extend_to_new_exit(circ, extend_info);
|
result = circuit_extend_to_new_exit(circ, extend_info);
|
||||||
} else {
|
} else {
|
||||||
log_info(LD_REND,
|
log_info(LD_REND,
|
||||||
"Building a new introduction circuit, this time to %s.",
|
"Closing intro circ %d (out of RELAY_EARLY cells).",
|
||||||
safe_str_client(extend_info_describe(extend_info)));
|
circ->_base.n_circ_id);
|
||||||
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED);
|
circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_FINISHED);
|
||||||
if (!circuit_launch_by_extend_info(CIRCUIT_PURPOSE_C_INTRODUCING,
|
/* connection_ap_handshake_attach_circuit will launch a new intro circ. */
|
||||||
extend_info,
|
result = 0;
|
||||||
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…
Add table
Reference in a new issue