Age | Commit message (Collapse) | Author |
|
|
|
|
|
Closes ticket 26647.
|
|
Fixes bug 25512.
(Cherry-picked from 3519d0c8086ede
|
|
|
|
For HSv3, the HSADDRESS= wasn't properly parsed for the HSPOST command. It now
correctly use it and furthermore sends back a "200 OK" in case the command is
successful for a v3 descriptor.
Fixes #26523
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
|
|
i don't know if whitespace is ok to have before preprocessing
directives on all platforms, but anyway we almost never have it,
so now things are more uniform.
|
|
Before this commit, the control events were never triggered. It was introduced
with commit 0c19ce7bdece5906e035e71d3fb682632c8bb9cb.
Fixes #26082
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
There are three cases where this can happen: changes in our
controller events, changes in our DisableNetwork setting, and
changes in our hibernation state.
Closes ticket 26063.
|
|
|
|
Everywhere we use we_are_hibernating(), remind the reader what it
means.
(Also, add an XXXX to note a DisableNetwork usage to change later.)
|
|
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.
|
|
|
|
|
|
|
|
No code behavior change.
Pars of #25988
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
This requires that when a log cb happens, the event for flushing
queued events is scheduled, so we also add the necessary machinery
to have that happen.
Note that this doesn't actually help with logs from outside the main
thread, but those were already suppressed: see #25987 for a ticket
tracking that issue.
|
|
Move most of the shared random functions that are needed outside of the
dirauth module.
At this commit, because dirvote.c hasn't been refactor, it doesn't compile
because some SR functions need a dirvote function.
Furthermore, 5 functions haven't been touched yet because they are dirauth
only but are in used in other C files than the dirauth module ones.
No code behavior change. Only moving code around.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
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>
|
|
|
|
|
|
|
|
Suggested by teor during code review for 25691.
|
|
Changing the name of this function should help keep us from misusing
it when node_has_preferred_descriptor() would be more appropriate.
|
|
|
|
|
|
This option was used for shadow testing previously, but is no longer
used for anything. It interferes with refactoring our token buckets.
|
|
* ADD new /src/common/crypto_rand.[ch] module.
* ADD new /src/common/crypto_util.[ch] module (contains the memwipe()
function, since all crypto_* modules need this).
* FIXES part of #24658: https://bugs.torproject.org/24658
|
|
Using this API lets us remove event2/event.h usage from half a dozen
modules, to better isolate libevent. Implements part of ticket
23750.
|
|
Add a missing lock acquisition around access to queued_control_events
in control_free_all(). Use the reassign-and-unlock strategy as in
queued_events_flush_all(). Fixes bug 25675. Coverity found this bug,
but only after we recently added an access to
flush_queued_event_pending.
|
|
|
|
|
|
|
|
There was a nonfatal assertion in pathbias_should_count that would
trigger if onehop_tunnel was set, but the desired_path_length was
greater than 1. This patch fixes that. Fixes bug 24903; bugfix on
0.2.5.2-alpha.
|
|
Fixes bug 25512.
|
|
|
|
|
|
|
|
We haven't meant to use it since we introduced the random
exponential schedule.
Closes ticket 23814.
|
|
Part of #24587
|
|
|
|
|
|
|
|
|
|
This patch is a result of auditing all of our uses of
get_datadir_fname() and its kin, and dividing them into cache vs
keys vs other data.
The new get_keydir_fname() and get_cachedir_fname() functions don't
actually do anything new yet.
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Make this a bit more safe with at least type checking of the pointers
depending on the version.
Signed-off-by: David Goulet <dgoulet@torproject.org>
|