]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Make sure that we are always a net participant when being a server
authorNick Mathewson <nickm@torproject.org>
Wed, 14 Nov 2018 20:05:05 +0000 (15:05 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 15 Nov 2018 16:17:27 +0000 (11:17 -0500)
Otherwise, if we're dormant, and we set ORPort, nothing makes us become
non-dormant.

src/core/mainloop/mainloop.c

index 9f45f3c8695f3b23185449ee780f6063000c56bf..2d12e264852de26b09f37e79e08b1278f2058fa2 100644 (file)
@@ -1515,7 +1515,8 @@ get_my_roles(const or_options_t *options)
                   options->ControlPort_set ||
                   options->OwningControllerFD != UINT64_MAX;
 
-  int is_net_participant = is_participating_on_network();
+  int is_net_participant = is_participating_on_network() ||
+    is_relay || is_hidden_service;
 
   if (is_bridge) roles |= PERIODIC_EVENT_ROLE_BRIDGE;
   if (is_client) roles |= PERIODIC_EVENT_ROLE_CLIENT;