mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Merge branch 'maint-0.2.8' into maint-0.2.9
This commit is contained in:
@@ -1816,6 +1816,7 @@ rend_service_receive_introduction(origin_circuit_t *circuit,
|
||||
time_t now = time(NULL);
|
||||
time_t elapsed;
|
||||
int replay;
|
||||
size_t keylen;
|
||||
|
||||
/* Do some initial validation and logging before we parse the cell */
|
||||
if (circuit->base_.purpose != CIRCUIT_PURPOSE_S_INTRO) {
|
||||
@@ -1889,9 +1890,10 @@ rend_service_receive_introduction(origin_circuit_t *circuit,
|
||||
}
|
||||
|
||||
/* check for replay of PK-encrypted portion. */
|
||||
keylen = crypto_pk_keysize(intro_key);
|
||||
replay = replaycache_add_test_and_elapsed(
|
||||
intro_point->accepted_intro_rsa_parts,
|
||||
parsed_req->ciphertext, parsed_req->ciphertext_len,
|
||||
parsed_req->ciphertext, MIN(parsed_req->ciphertext_len, keylen),
|
||||
&elapsed);
|
||||
|
||||
if (replay) {
|
||||
@@ -3849,6 +3851,10 @@ remove_invalid_intro_points(rend_service_t *service,
|
||||
log_info(LD_REND, "Expiring %s as intro point for %s.",
|
||||
safe_str_client(extend_info_describe(intro->extend_info)),
|
||||
safe_str_client(service->service_id));
|
||||
/* We might have put it in the retry list if so, undo. */
|
||||
if (retry_nodes) {
|
||||
smartlist_remove(retry_nodes, intro);
|
||||
}
|
||||
smartlist_add(service->expiring_nodes, intro);
|
||||
SMARTLIST_DEL_CURRENT(service->intro_nodes, intro);
|
||||
/* Intro point is expired, we need a new one thus don't consider it
|
||||
|
||||
+4
-1
@@ -2829,7 +2829,10 @@ router_choose_random_node(smartlist_t *excludedsmartlist,
|
||||
});
|
||||
}
|
||||
|
||||
if ((r = routerlist_find_my_routerinfo()))
|
||||
/* If the node_t is not found we won't be to exclude ourself but we
|
||||
* won't be able to pick ourself in router_choose_random_node() so
|
||||
* this is fine to at least try with our routerinfo_t object. */
|
||||
if ((r = router_get_my_routerinfo()))
|
||||
routerlist_add_node_and_family(excludednodes, r);
|
||||
|
||||
router_add_running_nodes_to_smartlist(sl, allow_invalid,
|
||||
|
||||
Reference in New Issue
Block a user