aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-09-15Split some long #if lines to make the #endif annotator happyNick Mathewson
2017-09-15Merge branch 'maint-0.3.1'Nick Mathewson
Resolve conflict with 23532 code.
2017-09-15kist: Cast, then do operations on int32.Nick Mathewson
Otherwise integer overflows can happen. Remember, doing a i32xi32 multiply doesn't actually produce a 64-bit output. You need to do i64xi32 or i64xi64. Coverity found this as CID 1417753
2017-09-15Merge branch 'bug23487_029'Nick Mathewson
2017-09-15Use different variable names for pw_uid usagesNick Mathewson
Catalyst points out that using pw_uid for two different purposes here is likely to be confusing.
2017-09-15Make netinet/tcp include conditional too: windows lacks it.Nick Mathewson
2017-09-15fix some 32-bit warnings about printf argumentsNick Mathewson
2017-09-15Merge branch 'remove_allow_dotexit_v2'Nick Mathewson
2017-09-15Remove AllowDotExit.Nick Mathewson
It's been deprecated since 0.2.9.2-alpha. Closes ticket 23426.
2017-09-15wrap a wide commentNick Mathewson
2017-09-15Merge remote-tracking branch 'dgoulet/ticket12541_032_02'Nick Mathewson
2017-09-15Merge remote-tracking branch 'dgoulet/ticket19254_032_01'Nick Mathewson
2017-09-15sched: add comment about how we determine if a socket should writeMatt Traudt
2017-09-15sched: add more per-socket limit documentation; int fixMatt Traudt
2017-09-15sched: Revert IF_BUG_ONCE() to tor_assert()David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Define SCHEDULER_KIST_PRIVATE for more encapsulationDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Improve logging if KIST is disabledDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15test: Fix unit tests with latest scheduler changesDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Make the scheduler object staticDavid Goulet
Each type of scheduler implements its own static scheduler_t object and returns a reference to it. This commit also makes it a const pointer that is it can only change inside the scheduler type subsystem but not outside for extra protection. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Compare channel pointer in the socket tableDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Make the outbuf table local to run()David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Make check-spaces happyDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Extra careful in channel_outbuf_length()David Goulet
In case we don't have a connection object in the channel, just be careful and recover. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Don't expose the global scheduler libevent objectDavid Goulet
Instead, add wrappers to do the needed action the different scheduler needs with the libevent object. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Always call on_channel_free() regardless of stateDavid Goulet
A channel can bounce in the scheduler and bounce out with the IDLE state which means that if it came in the scheduler once, it has socket information that needs to be freed from the global hash table. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Add Schedulers torrc optionDavid Goulet
This option is a list of possible scheduler type tor can use ordered by priority. Its default value is "KIST,KISTLite,Vanilla" which means that KIST will be used first and if unavailable will fallback to KISTLite and so on. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: change most asserts to non-fatal BUGsMatt Traudt
2017-09-15sched: revisist compatibility on non-linux systemsMatt Traudt
Wrap things in HAVE_KIST_SUPPORT until Tor compiles and tests cleanly on my OS X machine.
2017-09-15sched: rename scheduler to the_schedulerMatt Traudt
2017-09-15sched: validate KIST sched optionsMatt Traudt
2017-09-15sched: switch to monotonic time; add/fix comments, style, and logs msgsMatt Traudt
2017-09-15sched: Add sandbox support for KISTDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Fallback to naive approach if no runtime KIST supportDavid Goulet
It is possible that tor was compiled with KIST support but the running kernel has no support for it. In that case, fallback to a naive approach and flag that we have no kernel support. At this commit, if the kernel support is disabled, there are no ways to come back from it other than restarting tor with a kernel that supporst KIST. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Detect KIST support at compile timeDavid Goulet
Add a detection for the KIST scheduler in our build system and set HAVE_KIST_SUPPORT if available. Adapt the should use kist function with this new compile option. Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Implement the KIST schedulerMatt Traudt
Closes #12541 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Groundwork before KIST implementationMatt Traudt
- HT_FOREACH_FN defined in an additional place because nickm did that in an old kist prototype - Make channel_more_to_flush mockable for future sched tests - Add empty scheduler_{vanilla,kist}.c files and put in include.am Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15sched: Remove vanilla sched options that will be going awayMatt Traudt
- massive change to src/tgest/test_options.c since the sched options were added all over the place in it - removing the sched options caused some tests to pass/fail in new ways so I assumed current behavior is correct and made them pass again - ex: "ConnLimit must be greater" lines - ex: "Authoritative directory servers must" line - remove test_options_validate__scheduler in prep for new sched tests Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15Merge remote-tracking branch 'catalyst-oniongit/bug23532'Nick Mathewson
2017-09-15Make NETINFO clock skew detection work on clientsTaylor Yu
An unnecessary routerlist check in the NETINFO clock skew detection in channel_tls_process_netinfo_cell() was preventing clients from reporting NETINFO clock skew to controllers.
2017-09-15Refactor channeltls.c lightlyTaylor Yu
Refactor some repetitive deep indirections in several functions in channeltls.c into local variables.
2017-09-15Fix several places where md-using relays would get wrong behavior.Nick Mathewson
This patch replaces a few calls to router_get_by_id_digest ("do we have a routerinfo?") with connection_or_digest_is_known_relay ("do we know this relay to be in the consensus, or have been there some time recently?"). Found while doing the 21585 audit; fixes bug 23533. Bugfix on 0.3.0.1-alpha.
2017-09-15bump to 0.3.1.7Nick Mathewson
2017-09-15repair test_key_expiration.shNick Mathewson
2017-09-15Merge remote-tracking branch 'dgoulet/ticket23310_032_02'Nick Mathewson
2017-09-15Merge branch 'bug23488'Nick Mathewson
2017-09-15test: Make check-spaces happyDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15fixup! test: Add HS v3 client-side test for picking intro pointsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15Merge remote-tracking branch 'teor/ticket23528'Nick Mathewson
2017-09-15Merge remote-tracking branch 'teor/bug23524'Nick Mathewson
2017-09-15prop224: Fix memleak in client_get_random_intro().George Kadianakis
The memleak was occuring because of the way ExcludeNodes is handled in that function. Basically, we were putting excluded intro points extend infos in a special variable which was never freed. Also, if there were multiple excluded intro points then that variable was overwritten everytime leaking more memory. This commit should fix both issues.