diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-05-01 08:56:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-05-01 08:56:23 -0400 |
commit | 4cf6b67f5e83e1a26b4b2fbdb3b169c137a30687 (patch) | |
tree | 5f83cc4fb3260df61a8c45c8e5c8a992da8d44b6 /src/or/or.h | |
parent | 07b486c17a0c268bdcc5c47c41948ed4e16baa02 (diff) | |
parent | bfe5a739b79510d7ab32dad6e9882dc7b8bf024f (diff) | |
download | tor-4cf6b67f5e83e1a26b4b2fbdb3b169c137a30687.tar.gz tor-4cf6b67f5e83e1a26b4b2fbdb3b169c137a30687.zip |
Merge remote-tracking branch 'neel/b23094'
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/or/or.h b/src/or/or.h index 4ebf37fb3b..cd77b21056 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -894,8 +894,19 @@ rend_data_v2_t *TO_REND_DATA_V2(const rend_data_t *d) struct hs_ident_edge_conn_t; struct hs_ident_dir_conn_t; struct hs_ident_circuit_t; -/* Stub because we can't include hs_common.h. */ -struct hsdir_index_t; + +/* Hidden service directory index used in a node_t which is set once we set + * the consensus. */ +typedef struct hsdir_index_t { + /* HSDir index to use when fetching a descriptor. */ + uint8_t fetch[DIGEST256_LEN]; + + /* HSDir index used by services to store their first and second + * descriptor. The first descriptor is chronologically older than the second + * one and uses older TP and SRV values. */ + uint8_t store_first[DIGEST256_LEN]; + uint8_t store_second[DIGEST256_LEN]; +} hsdir_index_t; /** Time interval for tracking replays of DH public keys received in * INTRODUCE2 cells. Used only to avoid launching multiple @@ -2561,7 +2572,7 @@ typedef struct node_t { /* Hidden service directory index data. This is used by a service or client * in order to know what's the hs directory index for this node at the time * the consensus is set. */ - struct hsdir_index_t *hsdir_index; + struct hsdir_index_t hsdir_index; } node_t; /** Linked list of microdesc hash lines for a single router in a directory |