aboutsummaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-01-24 13:26:50 -0500
committerNick Mathewson <nickm@torproject.org>2018-01-24 13:53:55 -0500
commitd9fbd34f42274050a67f6fb6f7ad449d60af7e66 (patch)
tree08d1af4bf353d94b7f2a665ad3285ccd757b7fb4 /src/or/nodelist.c
parentfd8ee1d7c335a02a6fd29cd1a826037efe28e100 (diff)
downloadtor-d9fbd34f42274050a67f6fb6f7ad449d60af7e66.tar.gz
tor-d9fbd34f42274050a67f6fb6f7ad449d60af7e66.zip
Extract protover summary flags into a new structure
This will let us use them on routerinfo_t as well as on routerstatus_t, and save some time on relays. No behavioral changes here.
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r--src/or/nodelist.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index 2f039a9a52..7cdf28a370 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -447,7 +447,7 @@ nodelist_set_routerinfo(routerinfo_t *ri, routerinfo_t **ri_old_out)
/* Setting the HSDir index requires the ed25519 identity key which can
* only be found either in the ri or md. This is why this is called here.
* Only nodes supporting HSDir=2 protocol version needs this index. */
- if (node->rs && node->rs->supports_v3_hsdir) {
+ if (node->rs && node->rs->pv.supports_v3_hsdir) {
node_set_hsdir_index(node,
networkstatus_get_latest_consensus());
}
@@ -487,7 +487,7 @@ nodelist_add_microdesc(microdesc_t *md)
/* Setting the HSDir index requires the ed25519 identity key which can
* only be found either in the ri or md. This is why this is called here.
* Only nodes supporting HSDir=2 protocol version needs this index. */
- if (rs->supports_v3_hsdir) {
+ if (rs->pv.supports_v3_hsdir) {
node_set_hsdir_index(node, ns);
}
node_add_to_ed25519_map(node);
@@ -531,7 +531,7 @@ nodelist_set_consensus(networkstatus_t *ns)
}
}
- if (rs->supports_v3_hsdir) {
+ if (rs->pv.supports_v3_hsdir) {
node_set_hsdir_index(node, ns);
}
node_set_country(node);
@@ -980,9 +980,9 @@ node_supports_ed25519_link_authentication(const node_t *node,
}
if (node->rs) {
if (compatible_with_us)
- return node->rs->supports_ed25519_link_handshake_compat;
+ return node->rs->pv.supports_ed25519_link_handshake_compat;
else
- return node->rs->supports_ed25519_link_handshake_any;
+ return node->rs->pv.supports_ed25519_link_handshake_any;
}
tor_assert_nonfatal_unreached_once();
return 0;
@@ -996,7 +996,7 @@ node_supports_v3_hsdir(const node_t *node)
tor_assert(node);
if (node->rs) {
- return node->rs->supports_v3_hsdir;
+ return node->rs->pv.supports_v3_hsdir;
}
if (node->ri) {
if (node->ri->protocol_list == NULL) {
@@ -1026,7 +1026,7 @@ node_supports_ed25519_hs_intro(const node_t *node)
tor_assert(node);
if (node->rs) {
- return node->rs->supports_ed25519_hs_intro;
+ return node->rs->pv.supports_ed25519_hs_intro;
}
if (node->ri) {
if (node->ri->protocol_list == NULL) {
@@ -1047,7 +1047,7 @@ node_supports_v3_rendezvous_point(const node_t *node)
tor_assert(node);
if (node->rs) {
- return node->rs->supports_v3_rendezvous_point;
+ return node->rs->pv.supports_v3_rendezvous_point;
}
if (node->ri) {
if (node->ri->protocol_list == NULL) {