From: David Goulet Date: Tue, 25 Jul 2017 15:37:55 +0000 (-0400) Subject: hs: Update the IP failure cache only if legacy X-Git-Tag: tor-0.3.2.1-alpha~146^2~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88f64eee68c972845131c8e372af067d8bb37cd1;p=thirdparty%2Ftor.git hs: Update the IP failure cache only if legacy Don't assert() on rend_data when closing circuits to report an IP failure. The prop224 code doesn't have yet the support for this. Signed-off-by: David Goulet --- diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index d891c89f38..2f3fe327e6 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -1961,8 +1961,8 @@ circuit_about_to_free(circuit_t *circ) int timed_out = (reason == END_CIRC_REASON_TIMEOUT); tor_assert(circ->state == CIRCUIT_STATE_OPEN); tor_assert(ocirc->build_state->chosen_exit); - tor_assert(ocirc->rend_data); - if (orig_reason != END_CIRC_REASON_IP_NOW_REDUNDANT) { + if (orig_reason != END_CIRC_REASON_IP_NOW_REDUNDANT && + ocirc->rend_data) { /* treat this like getting a nack from it */ log_info(LD_REND, "Failed intro circ %s to %s (awaiting ack). %s", safe_str_client(rend_data_get_address(ocirc->rend_data)), @@ -1978,7 +1978,8 @@ circuit_about_to_free(circuit_t *circ) reason != END_CIRC_REASON_TIMEOUT) { origin_circuit_t *ocirc = TO_ORIGIN_CIRCUIT(circ); if (ocirc->build_state->chosen_exit && ocirc->rend_data) { - if (orig_reason != END_CIRC_REASON_IP_NOW_REDUNDANT) { + if (orig_reason != END_CIRC_REASON_IP_NOW_REDUNDANT && + ocirc->rend_data) { log_info(LD_REND, "Failed intro circ %s to %s " "(building circuit to intro point). " "Marking intro point as possibly unreachable.",