summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-05-10Merge remote-tracking branch 'public/bug25981'Nick Mathewson
2018-05-10Merge branch 'maint-0.3.3'Nick Mathewson
2018-05-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge remote-tracking branch 'dgoulet/bug26069_031_01' into maint-0.3.1Nick Mathewson
2018-05-10Merge branch 'maint-0.3.3'Nick Mathewson
2018-05-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-10Merge remote-tracking branch 'juga/ticket26007_029_02' into maint-0.2.9Nick Mathewson
2018-05-10hs-v3: Add an extra white-space when parsing descriptorDavid Goulet
The specification describes the signature token to be right after a newline (\n) then the token "signature" and then a white-space followed by the encoded signature. This commit makes sure that when we parse the signature from the descriptor, we are always looking for that extra white-space at the end of the token. It will allow us also to support future fields that might start with "signature". Fixes #26069 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-10Merge branch 'ticket26063_squashed'Nick Mathewson
2018-05-10Merge branch 'ticket26064'Nick Mathewson
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-10Add a new function to enable/disable the per-second timer as neededNick Mathewson
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.
2018-05-10Remove a workaround for ancient libevent versions.Nick Mathewson
Libevent has accepted a const timeval argument to event_add() for a very long time now.
2018-05-10Add functions to enable/disable periodic_event_t objects.Nick Mathewson
2018-05-10Merge remote-tracking branch 'dgoulet/ticket26062_034_01'Nick Mathewson
2018-05-10Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-10Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-05-10Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-05-09Merge branch 'ticket26016'Nick Mathewson
2018-05-09Merge branch 'ticket26009'Nick Mathewson
2018-05-09spelling fixNick Mathewson
2018-05-09Fix some clang warningsNick Mathewson
2018-05-09Mark the 1-per-sec update_current_time() call as redundant.Nick Mathewson
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.
2018-05-09Distinguish true clock jumps from idlenessNick Mathewson
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.
2018-05-09Give responsibility for waking up from DORMANT to a mainloop eventNick Mathewson
Closes ticket 26064.
2018-05-09Having a ControlPort open doesn't mean we are a clientDavid Goulet
The any_client_port_set() returns true if the ControlPort is set which is wrong because we can have that port open but still not behave as a tor client (like many relays for instance). Fixes #26062 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-09Having a ControlPort open doesn't mean we are a clientDavid Goulet
The options_any_client_port_set() returns true if the ControlPort is set which is wrong because we can have that port open but still not behave as a tor client (like many relays for instance). Fixes #26062 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-05-09config: Move any_client_port_set() to config.cDavid Goulet
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>
2018-05-09Use net_is_completely_disabled() in connection.cNick Mathewson
This fixes the XXXX case that we had before, and also enforces the rule that we won't open connections when we're in hard hibernation.
2018-05-09Add a new net_is_completely_disabled() functionNick Mathewson
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-09Add we_are_fully_hibernating() to distinguish hibernation statesNick Mathewson
We want to tell "shut down" from "shutting down".
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-09Test read bandwidth measurements with empty filejuga0
2018-05-09Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-05-09Merge branch 'maint-0.3.3'Nick Mathewson
2018-05-09Merge remote-tracking branch 'asn-github/bug25761_032' into maint-0.3.2Nick Mathewson
2018-05-09Stop logging stack contents when reading a zero-length bandwidth fileteor
When directory authorities read a zero-byte bandwidth file, they log a warning with the contents of an uninitialised buffer. Log a warning about the empty file instead. Fixes bug 26007; bugfix on 0.2.2.1-alpha.
2018-05-09Merge branch 'maint-0.3.3'Nick Mathewson
2018-05-09Merge branch 'libressl_201805_033' into maint-0.3.3Nick Mathewson
2018-05-09Merge remote-tracking branch 'public/bug26005_034'Nick Mathewson
2018-05-09Detect when v3 services get disabled after HUP.George Kadianakis
Remove v3 optimization which made Tor not detect disabling services. This optimization is not so needed because we only call that function after HUP anyway. Fixes bug #25761.
2018-05-09Detect when v2 services get disabled after HUP.George Kadianakis
During service configuration, rend_service_prune_list_impl_() sets rend_service_staging_list to NULL, which blocked pruning after a HUP. This patch initializes rend_service_staging_list when needed, so that HUP can detect disabled onion services. Fixes bug #25761.
2018-05-08Fix compilation of test_addr.cNick Mathewson
This needs to include crypto_rand.h (which it didn't before it was merged).
2018-05-08Merge branch 'ticket25993_squashed'Nick Mathewson
2018-05-08More unit tests for addressmap_get_virtual_address().Nick Mathewson
Previously the coverage on this function was mostly accidental, coming as it did from test_entryconn.c. These new tests use mocking to ensure that we actually hit the different failure and retry cases of addressmap_get_virtual_address(), and make our test coverage a bit more deterministic. Closes ticket 25993.