aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/authmode.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-01-09 07:32:39 -0500
committerNick Mathewson <nickm@torproject.org>2020-01-09 07:32:39 -0500
commite45810113b150533611c7d9cb5f0f264e00a7394 (patch)
tree771581e87e36d6e4a4c81019c61b0dcb444c5096 /src/feature/dirauth/authmode.c
parenta48cb9fa436720c263dd41ce501076185aeb5872 (diff)
parent8b2041c343098052dcec03cd6eda7087bc5c7616 (diff)
downloadtor-e45810113b150533611c7d9cb5f0f264e00a7394.tar.gz
tor-e45810113b150533611c7d9cb5f0f264e00a7394.zip
Merge branch 'pre_formatter_cleanups_squashed'
Diffstat (limited to 'src/feature/dirauth/authmode.c')
-rw-r--r--src/feature/dirauth/authmode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/feature/dirauth/authmode.c b/src/feature/dirauth/authmode.c
index 62fc1d8873..0fde7bc679 100644
--- a/src/feature/dirauth/authmode.c
+++ b/src/feature/dirauth/authmode.c
@@ -26,6 +26,15 @@ authdir_mode(const or_options_t *options)
{
return options->AuthoritativeDir != 0;
}
+
+/* Return true iff we believe ourselves to be a v3 authoritative directory
+ * server. */
+int
+authdir_mode_v3(const or_options_t *options)
+{
+ return authdir_mode(options) && options->V3AuthoritativeDir != 0;
+}
+
/** Return true iff we are an authoritative directory server that is
* authoritative about receiving and serving descriptors of type
* <b>purpose</b> on its dirport.