summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2015-05-29 17:45:45 -0400
committerNick Mathewson <nickm@torproject.org>2015-07-09 12:02:11 -0400
commit7c7bb8b97ed1fd012fd8cd4cf16217a1757621ec (patch)
tree0e1c26f18d614a76042bd821abc4bc34c73e5372 /src/or/or.h
parentadc04580f860b5e8cfd6d49c83fdf73764a4f8cc (diff)
downloadtor-7c7bb8b97ed1fd012fd8cd4cf16217a1757621ec.tar.gz
tor-7c7bb8b97ed1fd012fd8cd4cf16217a1757621ec.zip
Refactor rend_services_introduce()
The reasoning for refactoring this function is that removing the introduction point adaptative algorithm (#4862) ended up changing quite a bit rend_services_introduce(). Also, to fix some open issues (#8239, #8864 and #13483), this work had to be done. First, this removes time_expiring variable in an intro point object and INTRO_POINT_EXPIRATION_GRACE_PERIOD trickery and use an expiring_nodes list where intro nodes that should expire are moved to that list and cleaned up only once the new descriptor is successfully uploaded. The previous scheme was adding complexity and arbitrary timing to when we expire an intro point. We keep the intro points until we are sure that the new descriptor is uploaded and thus ready to be used by clients. For this, rend_service_desc_has_uploaded() is added to notify the HS subsystem that the descriptor has been successfully uploaded. The purpose of this function is to cleanup the expiring nodes and circuits if any. Secondly, this adds the remove_invalid_intro_points() function in order to split up rend_services_introduce() a bit with an extra modification to it that fixes #8864. We do NOT close the circuit nor delete the intro point if the circuit is still alive but the node was removed from the consensus. Due to possible information leak, we let the circuit and intro point object expire instead. Finally, the whole code flow is simplified and large amount of documentation has been added to mostly explain the why of things in there. Fixes #8864 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/or/or.h b/src/or/or.h
index d3a476ecf9..fc921a8e47 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4905,11 +4905,6 @@ typedef struct rend_intro_point_t {
* included in the last HS descriptor we generated. */
unsigned int listed_in_last_desc : 1;
- /** (Service side only) Flag indicating that
- * rend_service_note_removing_intro_point has been called for this
- * intro point. */
- unsigned int rend_service_note_removing_intro_point_called : 1;
-
/** (Service side only) A replay cache recording the RSA-encrypted parts
* of INTRODUCE2 cells this intro point's circuit has received. This is
* used to prevent replay attacks. */
@@ -4935,16 +4930,6 @@ typedef struct rend_intro_point_t {
* (start to) expire, or -1 if we haven't decided when this intro
* point should expire. */
time_t time_to_expire;
-
- /** (Service side only) The time at which we decided that this intro
- * point should start expiring, or -1 if this intro point is not yet
- * expiring.
- *
- * This field also serves as a flag to indicate that we have decided
- * to expire this intro point, in case intro_point_should_expire_now
- * flaps (perhaps due to a clock jump; perhaps due to other
- * weirdness, or even a (present or future) bug). */
- time_t time_expiring;
} rend_intro_point_t;
#define REND_PROTOCOL_VERSION_BITMASK_WIDTH 16