summaryrefslogtreecommitdiff
path: root/src/or/control.c
AgeCommit message (Collapse)Author
2018-07-20Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-07-20Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-07-10Add controller support for listing ExtORPort and HTTPTunnelPortsNick Mathewson
Closes ticket 26647.
2018-07-09Clear all control.c flags on control_free_all()Nick Mathewson
Fixes bug 25512. (Cherry-picked from 3519d0c8086ede
2018-07-01Merge branch 'maint-0.3.3' into maint-0.3.4Nick Mathewson
2018-06-27control: Make HSPOST properly parse HSADDRESS= paramDavid Goulet
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>
2018-06-20eol@eof is still the law in 0.3.4 :(Nick Mathewson
2018-06-20Fix clang warnings introduced by 9f2b887c5d251b93ee9def708Nick Mathewson
2018-05-14Merge branch 'bug25903_v5_squashed'Nick Mathewson
2018-05-11get rid of whitespace before #ifdef'sRoger Dingledine
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.
2018-05-11control: Mask the event(s) before using ANY_EVENT_IS_INTERESTING()David Goulet
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>
2018-05-10Enable/disable per-second callback as needed.Nick Mathewson
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.
2018-05-09Bug 25903: Report new CIRC_BW fields to control port.Mike Perry
2018-05-09Comment-only fix: annotate we_are_hibernating() usageNick Mathewson
Everywhere we use we_are_hibernating(), remind the reader what it means. (Also, add an XXXX to note a DisableNetwork usage to change later.)
2018-05-09Give control.c responsibility for its own once-a-second eventsNick Mathewson
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.
2018-05-09Add a macro to simplify control_update_global_event_mask().Nick Mathewson
2018-05-03Merge remote-tracking branch 'isis/bug24660_r1'Nick Mathewson
2018-05-03Merge remote-tracking branch 'github/ticket25951'Nick Mathewson
2018-05-01sr: Rename shared_random_common.{c|h} to shared_random_client.{c|h}David Goulet
No code behavior change. Pars of #25988 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-01Give queued_events_flush_all() responsibility for flushing log cbsNick Mathewson
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.
2018-04-27sr: Extract shared SR functionsDavid Goulet
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>
2018-04-27mod: Move dirauth specific files to its own moduleDavid Goulet
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>
2018-04-23Merge remote-tracking branch 'neel/b25511-r4'Nick Mathewson
2018-04-22Merge remote-tracking branch 'mikeperry/bug25400_squashed'Nick Mathewson
2018-04-22Merge branch 'bug25691_033_again_squashed'Nick Mathewson
2018-04-22control EXTENDCIRCUIT: check node_has_preferred_descriptor().Nick Mathewson
Suggested by teor during code review for 25691.
2018-04-22Rename node_has_descriptor() to node_has_any_descriptor()Nick Mathewson
Changing the name of this function should help keep us from misusing it when node_has_preferred_descriptor() would be more appropriate.
2018-04-16Add GETINFO current-time/{local,utc} command to ControlPortNeel Chauhan
2018-04-16Bug 25400: Make CIRC_BW event properly total everything on a circ.Mike Perry
2018-04-10Remove TestingEnableTbEmptyEventNick Mathewson
This option was used for shadow testing previously, but is no longer used for anything. It interferes with refactoring our token buckets.
2018-04-06crypto: Refactor (P)RNG functionality into new crypto_rand module.Isis Lovecruft
* 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
2018-04-05Add an API for a scheduled/manually activated event in the mainloopNick Mathewson
Using this API lets us remove event2/event.h usage from half a dozen modules, to better isolate libevent. Implements part of ticket 23750.
2018-03-29Fix CID 1433643Taylor Yu
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.
2018-03-28Merge remote-tracking branch 'public/bug25512'Nick Mathewson
2018-03-26Merge branch 'maint-0.3.3'Nick Mathewson
2018-03-26Merge branch 'bug24903_029' into maint-0.3.3Nick Mathewson
2018-03-26When extending a circuit's path length, clear onehop_tunnel.Nick Mathewson
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.
2018-03-23Clear all control.c flags on control_free_all()Nick Mathewson
Fixes bug 25512.
2018-03-14Merge remote-tracking branch 'public/restart_reset_bootstrap'Nick Mathewson
2018-03-03Merge branch 'ticket23814' into maint-0.3.3Nick Mathewson
2018-02-07Fix spelling mistakes corresponding to ticket #23650Deepesh Pathak
2018-01-25Remove the old ("deterministic") download schedule.Nick Mathewson
We haven't meant to use it since we introduced the random exponential schedule. Closes ticket 23814.
2017-12-11In control.c, reset the bootstrapping status on shutdownNick Mathewson
Part of #24587
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Convert remaining function (mostly static) to new free styleNick Mathewson
2017-12-05Initialize pk so that older gcc versions don't freak out.Nick Mathewson
2017-12-05Merge branch 'more_directories_squashed'Nick Mathewson
2017-12-05New accessors for keydir/cachedir accessNick Mathewson
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.
2017-12-05control: Improve ADD_ONION helper function commentsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-05control: Don't use void pointer for ADD_ONION secret keyDavid Goulet
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>