diff options
Diffstat (limited to 'src/feature/dirclient/dirclient_modes.c')
-rw-r--r-- | src/feature/dirclient/dirclient_modes.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/feature/dirclient/dirclient_modes.c b/src/feature/dirclient/dirclient_modes.c index 37d2d7e044..8a98f02769 100644 --- a/src/feature/dirclient/dirclient_modes.c +++ b/src/feature/dirclient/dirclient_modes.c @@ -23,6 +23,16 @@ #include "app/config/or_options_st.h" #include "feature/nodelist/routerinfo_st.h" +/* Should this tor instance only use begindir for all its directory requests? + */ +int +directory_must_use_begindir(const or_options_t *options) +{ + /* Clients, onion services, and bridges must use begindir, + * relays and authorities do not have to */ + return !public_server_mode(options); +} + /** Return 1 if we fetch our directory material directly from the * authorities, rather than from a mirror. */ int |