- 16 Oct, 2018 1 commit
-
-
It turns out that if _only_ the ControlPort is set and nothing else, tor would simply not bootstrap and thus not start properly. Commit 67a41b63 removed that requirement for tor to be considered a "client". Unfortunately, this made the mainloop enable basically nothing if only the ControlPort is set in the torrc. This commit now makes it that we also consider the ControlPort when deciding if we are a Client or not. It does not revert 67a41b63 meaning options_any_client_port_set() stays the same, not looking at the control port. Fixes #27849 . Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- 07 Sep, 2018 1 commit
-
-
teor authored
It is not supported, and always fails. Some compilers warn about the function pointer cast on 64-bit Windows. Fixes bug 27461; bugfix on 0.2.2.23-alpha.
-
- 31 Jul, 2018 1 commit
-
-
Nick Mathewson authored
We would usually call it through tor_cleanup(), but in some code paths, we wouldn't. These paths would break restart-in-process, since leaving fields uncleared would cause assertion failures on restart. Fixes bug 26948; bugfix on 0.3.3.1-alpha
-
- 10 May, 2018 1 commit
-
-
Nick Mathewson authored
We're about to use this to turn off the per-second timer when the network is disabled and there aren't any per-second controller events enabled.
-
- 09 May, 2018 8 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
We still do this time update here, since we do it from all callbacks, but it is no longer a reason to keep the once-per-second callback enabled. Closes ticket 26009.
-
Nick Mathewson authored
Since we're going to be disabling the second-elapsed callback, we're going to sometimes have long periods when no events file, and so the current second is not updated. Handle that by having a better means to detect "clock jumps" as opposed to "being idle for a while". Tolerate far more of the latter. Part of #26009.
-
Nick Mathewson authored
Closes ticket 26064.
-
David Goulet authored
This functions is now used outside of networkstatus.c and makes more sense to be in config.c. It is also renamed to options_any_client_port_set() for the config.c namespace. No code behavior change. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Nick Mathewson authored
Everywhere we use we_are_hibernating(), remind the reader what it means. (Also, add an XXXX to note a DisableNetwork usage to change later.)
-
Nick Mathewson authored
Now it has a function that can tell the rest of Tor whether any once-a-second controller item should fire, and a function to fire all the once-a-second events.
-
- 07 May, 2018 1 commit
-
-
Nick Mathewson authored
Fixes bug 25981; bugfix on 96c5ac33. Bug not in any released version of Tor.
-
- 03 May, 2018 3 commits
-
-
Nick Mathewson authored
We cleared this value in second_elapsed_callback. But what were we using it for? For detecting if Libevent returned EINVAL too often! We already have a way to detect too-frequent events, and that's with a ratelim_t. Refactor the code to use that instead. Closes ticket 26016.
-
Nick Mathewson authored
This is part of 26009, where we're going to keep track of the current time and its jumps without having to do so in second_elapsed_callback.
-
Nick Mathewson authored
This now happens in a new function, with the intent of having it invoked from our callbacks. This is one step on the way to 26009.
-
- 02 May, 2018 1 commit
-
-
David Goulet authored
This function must return false if the module is not compiled in. In order to do that, we move the authdir_mode_v3() function out of router.c and into the dirauth module new header file named mode.h. It is always returning false if we don't have the module. Closes #25990 Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- 01 May, 2018 6 commits
-
-
Nick Mathewson authored
Arguably, the conditions under which these events happen should be a bit different, but the rules are complex enough here that I've tried to have this commit be pure refactoring. Closes ticket 25952. Finally, before this code goes away, take a moment to look at the amazing way that we used to try to have an event happen every N seconds: get_uptime() / N != (get_uptime()+seconds_elapsed) / N Truly, it is a thing of wonder. I'm glad we didn't start using this pattern everywhere else.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
Closes ticket25937.
-
Nick Mathewson authored
Apparently, we can decide our state is dirty before we create the event to tell the mainloop that we should save it. That's not a problem, except for the assertion failure.
-
Nick Mathewson authored
This is now handled as-needed as the control module is flushing its own callbacks. Closes ticket 25951.
-
- 30 Apr, 2018 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
Closes ticket 25948.
-
- 27 Apr, 2018 5 commits
-
-
David Goulet authored
This is a pretty big commit but it only moves these files to src/or/dirauth: dircollate.c dirvote.c shared_random.c shared_random_state.c dircollate.h dirvote.h shared_random.h shared_random_state.h Then many files are modified to change the include line for those header files that have moved into a new directory. Without using --disable-module-dirauth, everything builds fine. When using the flag to disable the module, tor doesn't build due to linking errors. This will be addressed in the next commit(s). No code behavior change. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
David Goulet authored
This is done because it makes our life easier with unit tests. Also, a rescan on an uninitialized event list will result in a stacktrace. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Nick Mathewson authored
Closes ticket 25949.
-
When we change the hibernation state, rescan the main loop event list because the new state might affect the events. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
Implement the ability to set flags per events which influences the set up of the event. This commit only adds one flag which is "need network" meaning that the event is not enabled if tor has disabled the network or if hibernation mode. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- 26 Apr, 2018 5 commits
-
-
Nick Mathewson authored
Bug not in any released Tor.
-
Nick Mathewson authored
In 25374, we created the necessary post-loop event for scheduling connection_ap_attach_pending as needed. Before that, we were already running this event once per mainloop. There's no reason to also run it once per second. Closes ticket 25933. No changes file, since the relevant change is already in 25374. Or possibly in 17590, depending on how you look at it.
-
Nick Mathewson authored
Implements ticket 25932.
-
Nick Mathewson authored
The change here was very simple, since there is a flag set whenever we want to schedule this event. Closes ticket 25391. m
-
Nick Mathewson authored
This part of the code was the only part that used "cached getttimeofday" feature, which wasn't monotonic, which we updated at slight expense, and which I'd rather not maintain.
-
- 25 Apr, 2018 2 commits
-
-
David Goulet authored
The clean_consdiffmgr() callback is only for relays acting as a directory server, not all relays. This commit adds a role for only directory server and sets the clean_consdiffmgr() callback to use it. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
David Goulet authored
Only relevant for directory servers. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- 23 Apr, 2018 3 commits
-
-
David Goulet authored
Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
David Goulet authored
Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
-