summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-07-19Remove tor_gettimeofday_cached_monotonic as broken and unneededNick Mathewson
2016-07-19Use coarse monotonic timer instead of cached monotonized libevent time.Nick Mathewson
2016-07-19convert timers.c to use real monotonic time.Nick Mathewson
2016-07-19Basic portable monotonic timer implementationNick Mathewson
This code uses QueryPerformanceCounter() [**] on Windows, mach_absolute_time() on OSX, clock_gettime() where available, and gettimeofday() [*] elsewhere. Timer types are stored in an opaque OS-specific format; the only supported operation is to compute the difference between two timers. [*] As you know, gettimeofday() isn't monotonic, so we include a simple ratchet function to ensure that it only moves forward. [**] As you may not know, QueryPerformanceCounter() isn't actually always as monotonic as you might like it to be, so we ratchet that one too. We also include a "coarse monotonic timer" for cases where we don't actually need high-resolution time. This is GetTickCount{,64}() on Windows, clock_gettime(CLOCK_MONOTONIC_COARSE) on Linux, and falls back to regular monotonic time elsewhere.
2016-07-08Move our "what time is it now" compat functions into a new moduleNick Mathewson
I'm not moving our "format and parse the time" functions, since those have been pretty volatile over the last couple of years.
2016-07-08Merge remote-tracking branch 'sebastian/libevent2'Nick Mathewson
2016-07-06test coverage on onion_fast: 0%->100%Nick Mathewson
2016-07-06Capture the LOG_ERR messages in our tests that had logged errors.Nick Mathewson
(It's confusing for the test to write an expected error to stdout, and then tell the user "OK".)
2016-07-06When saving mocked log messages, always create the list.Nick Mathewson
Otherwise, our code needs to check "list && smarlist_len(list)..."
2016-07-06Improve test coverage a little on onion*.cNick Mathewson
2016-07-06Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-06Fix sign in test-timersNick Mathewson
2016-07-06When checking if a routerstatus is reachable, don't check the nodeteor (Tim Wilson-Brown)
This fixes #19608, allowing IPv6-only clients to use microdescriptors, while preserving the ability of bridge clients to have some IPv4 bridges and some IPv6 bridges. Fix on c281c036 in 0.2.8.2-alpha.
2016-07-05Merge remote-tracking branch 'teor/bug18456'Nick Mathewson
2016-07-05Test: fix shared random test checking bad errnoDavid Goulet
The test was checking for EISDIR which is a Linux-ism making other OSes unhappy. Instead of checking for a negative specific errno value, just make sure it's negative indicating an error. We don't need more for this test. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-05Fix shared-random testNick Mathewson
2016-07-05Update version to 0.2.8.5-rc. This is not yet a release.Nick Mathewson
2016-07-05Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-05Repair unit test that assumed we have 9 dirauths.Nick Mathewson
2016-07-05Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-05Merge remote-tracking branch 'weasel/bug19557' into maint-0.2.8Nick Mathewson
2016-07-05Merge remote-tracking branch 'weasel/bug19556' into maint-0.2.8Nick Mathewson
2016-07-05Merge branch 'maint-0.2.8'Nick Mathewson
2016-07-05Merge branch 'maint-0.2.7' into maint-0.2.8Nick Mathewson
2016-07-05Merge branch 'maint-0.2.6' into maint-0.2.7Nick Mathewson
2016-07-05Merge branch 'maint-0.2.5' into maint-0.2.6Nick Mathewson
2016-07-05Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-07-05Merge remote-tracking branch 'asn/bug19555'Nick Mathewson
2016-07-05Merge remote-tracking branch 'dgoulet/bug19567_029_01'Nick Mathewson
2016-07-05Merge remote-tracking branch 'asn/bug19551'Nick Mathewson
2016-07-05Grammar.Nick Mathewson
I grepped and hand-inspected the "it's" instances, to see if any were supposed to be possessive. While doing that, I found a "the the", so I grepped to see if there were any more.
2016-07-04Remove src/or/eventdns_tor.h based on cypherpunk's reviewSebastian Hahn
2016-07-04sr: add the base16 RSA identity digest to commitDavid Goulet
Keep the base16 representation of the RSA identity digest in the commit object so we can use it without using hex_str() or dynamically encoding it everytime we need it. It's used extensively in the logs for instance. Fixes #19561 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-04sr: Fix comment in shared_random.hDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-04test: Fix shared random buffer overrunDavid Goulet
Encoded commit has an extra byte at the end for the NUL terminated byte and the test was overrunning the payload buffer by one byte. Found by Coverity issue 1362984. Fixes #19567 Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-04sr: Remove useless code in disk_state_update()David Goulet
This patch also updates a comment in the same function for accuracy. Found by Coverity issue 1362985. Partily fixes #19567. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-07-04prop250: Fix voting_schedule_t memleak in sr_state_update().George Kadianakis
2016-07-04prop250: Plug TorVersion memleak in disk_state_reset().George Kadianakis
2016-07-04Address review comments from cypherpunksSebastian Hahn
2016-07-04Raise libevent dependency to 2.0.10-stable or newerSebastian Hahn
Only some very ancient distributions don't ship with Libevent 2 anymore, even the oldest supported Ubuntu LTS version has it. This allows us to get rid of a lot of compat code.
2016-07-04Remove two wrong commentsSebastian Hahn
2016-07-03Remove urras as a default trusted directory authoritySebastian Hahn
It had been a directory authority since 0.2.1.20.
2016-07-03sandboxing: allow writing to stats/hidserv-statsPeter Palfrader
Our sandboxing code would not allow us to write to stats/hidserv-stats, causing tor to abort while trying to write stats. This was previously masked by bug#19556.
2016-07-03sandboxing: allow open() of stats dirPeter Palfrader
When sandboxing is enabled, we could not write any stats to disk. check_or_create_data_subdir("stats"), which prepares the private stats directory, calls check_private_dir(), which also opens and not just stats() the directory. Therefore, we need to also allow open() for the stats dir in our sandboxing setup.
2016-07-03Remove HAVE_EVENT_H from winconfigSebastian Hahn
This was accidentally left in in f25e2167f556.
2016-07-03Remove HAVE_EVENT_* defines from winconfigSebastian Hahn
They were accidentally left sitting around in 517e0f965.
2016-07-02Fix edge case fail of shared random unittest.George Kadianakis
The test_state_update() test would fail if you run it between 23:30 and 00:00UTC in the following line because n_protocol_runs was 2: tt_u64_op(state->n_protocol_runs, ==, 1); The problem is that when you launch the test at 23:30UTC (reveal phase), sr_state_update() gets called from sr_state_init() and it will prepare the state for the voting round at 00:00UTC (commit phase). Since we transition from reveal to commit phase, this would trigger a phase transition and increment the n_protocol_runs counter. The solution is to initialize the n_protocol_runs to 0 explicitly in the beginning of the test, as we do for n_reveal_rounds, n_commit_rounds etc.
2016-07-01Keep make check-spaces happyAndrea Shepard
2016-07-01Windows open() returns eacces when eisdir would be saneNick Mathewson
2016-07-01Fix i386 conversion warningsNick Mathewson