--- /dev/null
+ o Minor bugfixes (onion services v3):
+ - Avoid a non-fatal assert log in an edge-case of opening an intro circuit
+ as a client. Fixes bug 34084; bugfix on 0.3.2.1-alpha.
}
/** Using the introduction circuit circ, setup the authentication key of the
- * intro point this circuit has extended to. */
-static void
+ * intro point this circuit has extended to.
+ *
+ * Return 0 if everything went well, otherwise return -1 in the case of errors.
+ */
+static int
setup_intro_circ_auth_key(origin_circuit_t *circ)
{
const hs_descriptor_t *desc;
/* Reaching this point means we didn't find any intro point for this circuit
* which is not supposed to happen. */
- tor_assert_nonfatal_unreached();
+ circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL);
+ log_info(LD_REND, "Could not match opened intro circuit with intro point.");
+ return -1;
end:
- return;
+ return 0;
}
/** Called when an introduction circuit has opened. */
/* This is an introduction circuit so we'll attach the correct
* authentication key to the circuit identifier so it can be identified
* properly later on. */
- setup_intro_circ_auth_key(circ);
+ if (setup_intro_circ_auth_key(circ) < 0) {
+ return;
+ }
connection_ap_attach_pending(1);
}