aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-26Add a function to compute millisecond time difference quickly.Nick Mathewson
Our main function, though accurate on all platforms, can be very slow on 32-bit hosts. This one is faster on all 32-bit hosts, and accurate everywhere except apple, where it will typically be off by 1%. But since 32-bit apple is a relic anyway, I think we should be fine.
2018-04-26Remove the "cached gettimeofday" logic.Nick Mathewson
Previously were using this value to have a cheap highish-resolution timer. But we were only using it in one place, and current dogma is to use monotime_coarse_t for this kind of thing.
2018-04-26Rewrite time-handling in circuitmux_ewma to use monotime_coarseNick Mathewson
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.
2018-04-26Remove a blank line that was bothering me.Nick Mathewson
2018-04-25Ignore CircuitPriorityHalflife values under -EPSILON.Nick Mathewson
Previously, we were ignoring values _over_ EPSILON. This bug was also causing a warning at startup because the default value is set to -1.0. Fixes bug 25577; bugfix on 6b1dba214db. Bug not in any released tor.
2018-04-25Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-25Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-25Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-25Fix a copy-paste error in the fix for #23693.Nick Mathewson
Found by coverity; CID 25912; bug not in any released Tor.
2018-04-24Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-24Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-24Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-24Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-04-24Merge branch 'travis_distcheck_033' into maint-0.3.3Nick Mathewson
2018-04-24Merge branch 'travis_distcheck_029' into maint-0.2.9Nick Mathewson
2018-04-24Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-24Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-24Merge remote-tracking branch 'dgoulet/bug25901_032_01' into maint-0.3.2Nick Mathewson
2018-04-24Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-24Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-24Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-24Merge remote-tracking branch 'public/bug23693_031_redux' into maint-0.3.1Nick Mathewson
2018-04-23hs: Fix memleak in v3 on SIGHUPDavid Goulet
Fixes #25901 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23Merge remote-tracking branch 'dgoulet/ticket25762_034_05'Nick Mathewson
2018-04-23test: Add periodic events unit testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23main: Update periodic events comment based on latest codeDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23main: Use rescan_periodic_events in initialize_periodic_events_cbNick Mathewson
2018-04-23periodic: Add an enable and disable functionDavid Goulet
Two helper functions to enable an event and disable an event which wraps the launch and destroy of an event but takes care of the enabled flag. They are also idempotent that is can be called multiple time on the same event without effect if the event was already enabled or disabled. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23config: Set up periodic events when options changesDavid Goulet
In case we transitionned to a new role in Tor, we need to launch and/or destroy some periodic events. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23main: Launch periodic events by rolesDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23main: Specialize the periodic events on a per-role basisDavid Goulet
In tor, we have a series of possible "roles" that the tor daemon can be enabled for. They are: Client, Bridge, Relay, Authority (directory or bridge) and Onion service. They can be combined sometimes. For instance, a Directory Authority is also a Relay. This adds a "roles" field to a periodic event item object which is used to know for which roles the event is for. The next step is to enable the event only if the roles apply. No behavior change at this commit. Pars of #25762 Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23main: Sort alphabetically periodic event callbacksDavid Goulet
No behavior change, just to make it easier to find callbacks and for the sake of our human brain to parse the list properly. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23Merge remote-tracking branch 'github/lazy_bucket_refill'Nick Mathewson
2018-04-23Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-23Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-23Merge branch 'maint-0.3.1' into maint-0.3.2Nick Mathewson
2018-04-23Merge branch 'maint-0.2.9' into maint-0.3.1Nick Mathewson
2018-04-23Merge branch 'maint-0.3.3'Nick Mathewson
2018-04-23Merge branch 'maint-0.3.2' into maint-0.3.3Nick Mathewson
2018-04-23Merge branch 'bug24969_029_v2' into maint-0.2.9Nick Mathewson
2018-04-23Permit the nanosleep system call in the seccomp2 callboxNick Mathewson
Fixes bug 24969; bugfix on 0.2.5.1-alpha when the sandbox was introduced.
2018-04-23Merge remote-tracking branch 'neel/b25511-r4'Nick Mathewson
2018-04-23Document default for ControlSocket.Nick Mathewson
Closes 25897.
2018-04-22Merge branch 'ticket25024_squashed'Nick Mathewson
2018-04-22Tweak changes file for 25024 to mention "check-typos"Nick Mathewson
2018-04-22add changes file and update check-typos in makefileDeepesh Pathak
2018-04-22Add spell check to makefile to check for typos ticket#25024Deepesh Pathak
- Use misspell to check for typos in codebase - Add `make check-typos` to run the checks - Add `check-typos` to `make check`
2018-04-22Merge remote-tracking branch 'mikeperry/bug25400_squashed'Nick Mathewson
2018-04-22Merge branch 'remove_old_consensus_methods_2018_squashed'Nick Mathewson
2018-04-22Add a changes file for removing old consensus methodsNick Mathewson
(Ticket 24378; proposal 290.)