mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
nodelist: Make HSv3 protover magic numbers a bit more readable.
This commit is contained in:
parent
c17a04376d
commit
551ad20c43
2 changed files with 7 additions and 2 deletions
|
@ -722,7 +722,7 @@ node_supports_v3_hsdir(const node_t *node)
|
|||
return 0;
|
||||
}
|
||||
return protocol_list_supports_protocol(node->ri->protocol_list,
|
||||
PRT_HSDIR, 2);
|
||||
PRT_HSDIR, PROTOVER_HSDIR_V3);
|
||||
}
|
||||
tor_assert_nonfatal_unreached_once();
|
||||
return 0;
|
||||
|
@ -743,7 +743,7 @@ node_supports_ed25519_hs_intro(const node_t *node)
|
|||
return 0;
|
||||
}
|
||||
return protocol_list_supports_protocol(node->ri->protocol_list,
|
||||
PRT_HSINTRO, 4);
|
||||
PRT_HSINTRO, PROTOVER_HS_INTRO_V3);
|
||||
}
|
||||
tor_assert_nonfatal_unreached_once();
|
||||
return 0;
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
/* This is a guess. */
|
||||
#define FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS "0.2.9.3-alpha"
|
||||
|
||||
/** The protover version number that signifies HSDir support for HSv3 */
|
||||
#define PROTOVER_HSDIR_V3 2
|
||||
/** The protover version number that signifies HSv3 intro point support */
|
||||
#define PROTOVER_HS_INTRO_V3 4
|
||||
|
||||
/** List of recognized subprotocols. */
|
||||
typedef enum protocol_type_t {
|
||||
PRT_LINK,
|
||||
|
|
Loading…
Add table
Reference in a new issue