diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-10-16 17:33:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-10-16 17:33:58 -0400 |
commit | 56a3cef4d73922a687fa4256938b5c459aada42c (patch) | |
tree | 9a632fdc4116b5614347b45566e1d232f9bc4395 /src/core/mainloop | |
parent | 698629f5a9eca21e0251f5d249f176a00aebf871 (diff) | |
parent | b5731cdf2ecdf0662de7268d95aa67cfaca92b6e (diff) | |
download | tor-56a3cef4d73922a687fa4256938b5c459aada42c.tar.gz tor-56a3cef4d73922a687fa4256938b5c459aada42c.zip |
Merge branch 'bug27849_redux'
Diffstat (limited to 'src/core/mainloop')
-rw-r--r-- | src/core/mainloop/mainloop.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/mainloop/mainloop.c b/src/core/mainloop/mainloop.c index 6c305c2b47..0f3fbbcce0 100644 --- a/src/core/mainloop/mainloop.c +++ b/src/core/mainloop/mainloop.c @@ -1492,13 +1492,18 @@ get_my_roles(const or_options_t *options) int roles = 0; int is_bridge = options->BridgeRelay; - int is_client = options_any_client_port_set(options); int is_relay = server_mode(options); int is_dirauth = authdir_mode_v3(options); int is_bridgeauth = authdir_mode_bridge(options); int is_hidden_service = !!hs_service_get_num_services() || !!rend_num_services(); int is_dirserver = dir_server_mode(options); + /* We also consider tor to have the role of a client if the ControlPort is + * set because a lot of things can be done over the control port which + * requires tor to have basic functionnalities. */ + int is_client = options_any_client_port_set(options) || + options->ControlPort_set || + options->OwningControllerFD >= 0; if (is_bridge) roles |= PERIODIC_EVENT_ROLE_BRIDGE; if (is_client) roles |= PERIODIC_EVENT_ROLE_CLIENT; |