Commit Graph

31674 Commits

Author SHA1 Message Date
George Kadianakis bc64fb4e33 circpad: Don't pad if Tor is in dormant mode.
This is something we should think about harder, but we probably want dormant
mode to be more powerful than padding in case a client has been inactive for a
day or so. After all, there are probably no circuits open at this point and
dormant mode will not allow the client to open more circuits.

Furthermore, padding should not block dormant mode from being activated, since
dormant mode relies on SocksPort activity, and circuit padding does not mess
with that.
2019-03-21 10:29:04 +10:00
George Kadianakis fe78ba855a prob_distr: Better document our public API. 2019-03-13 17:51:19 +02:00
George Kadianakis 8d9f81bc9c prob_distr: Implement type-safe downcasting functions. 2019-03-13 17:51:19 +02:00
Nick Mathewson 58fd864a85 Merge remote-tracking branch 'tor-github/pr/705' 2019-03-13 09:36:47 -04:00
Nick Mathewson 17ff69a268 Merge branch 'bug29221_more_squashed' 2019-03-13 09:30:02 -04:00
Nick Mathewson 504aef6228 Changes file for practracker (29221) 2019-03-13 09:29:10 -04:00
George Kadianakis 3e38efdf16 practracker: Fix duplicate exceptions and handle them more "gracefully". 2019-03-13 09:27:29 -04:00
Nick Mathewson 21c6e295ca grandfather in two more functions 2019-03-13 09:27:29 -04:00
Nick Mathewson e2512950b6 Improve failure message from check-best-practices 2019-03-13 09:27:29 -04:00
Nick Mathewson f0302d51ab practracker: Be more careful about excluding "confusing terms"
Previously we excluded any line containing one of these terms from
consideration as the start or end of a function.  Now we're more
careful, and we only ignore these terms when they appear to be
starting a function definition.
2019-03-13 09:27:29 -04:00
George Kadianakis ec8c5b3fea practracker: Improvements based on last Nick's review. 2019-03-13 09:27:29 -04:00
George Kadianakis 157f7ba93e practracker: Update exceptions file :) 2019-03-13 09:27:29 -04:00
George Kadianakis 8c9835c6e5 practracker: Normalize filesystem paths across Windows and Posix.
This was causing issues because the exceptions file is written using Posix
paths, whereas practracker in Windows was trying to match Windows paths ("\"
instead of "/").
2019-03-13 09:27:29 -04:00
George Kadianakis 8bacc1dad1 practracker: Improve documentation in problem.py . 2019-03-13 09:27:29 -04:00
George Kadianakis 4795f2d3a0 Fold in an initial practracker exceptions file. 2019-03-13 09:27:29 -04:00
George Kadianakis 58de565988 Call practracker as part of check-local.
- Introduce 'make check-best-practices'.
- Fix up Tor topdir etc to work with the way 'make check-local' gets called.
- Make practracker less likely to print useless stuff.
2019-03-13 09:27:24 -04:00
George Kadianakis cdaff26f91 circpad: Machines MUST have strictly increasing histogram edges.
Add a basic validation function for the histograms. It can be a building block
for the future
2019-03-13 13:35:52 +02:00
George Kadianakis 32c821c47b circpad: Documentation improvements after Nick's review. 2019-03-13 13:22:17 +02:00
teor 2b5cc8a059 Merge remote-tracking branch 'tor-github/pr/783' 2019-03-13 10:15:59 +10:00
Nick Mathewson cd52e13946 Merge branch 'maint-0.4.0' 2019-03-12 14:22:08 -04:00
George Kadianakis ec2a2a6b7a Fix #28525 changes file that is breaking CI. 2019-03-12 20:11:51 +02:00
George Kadianakis 18a4f535d3 Merge branch 'maint-0.4.0' 2019-03-12 18:11:53 +02:00
George Kadianakis 0ce32affc2 Merge branch 'tor-github/pr/763' into maint-0.4.0 2019-03-12 18:11:35 +02:00
Nick Mathewson 61adcb22c5 Merge branch 'bug23576-041-rebased-squashed' 2019-03-12 11:10:01 -04:00
teor 680b2afd84 hs: abolish hs_desc_link_specifier_dup()
The previous commits introduced link_specifier_dup(), which is
implemented using trunnel's opaque interfaces. So we can now
remove hs_desc_link_specifier_dup().

Cleanup after bug 22781.
2019-03-12 11:09:53 -04:00
teor 257cea8876 test/hs: minor hs test fixes
Cleanup some bugs discovered during 23576:

* stop copying the first 20 characters of a 40-character hex string
  to a binary fingerprint
* stop putting IPv6 addresses in a variable called "ipv4"
* explain why we do a duplicate tt_int_op() to deliberately fail and
  print a value

Fixes bug 29243; bugfix on 0.3.2.1-alpha.
2019-03-12 11:09:53 -04:00
teor bb98bc8562 hs: abolish hs_desc_link_specifier_t
The previous commits for 23576 confused hs_desc_link_specifier_t
and link_specifier_t. Removing hs_desc_link_specifier_t fixes this
confusion.

Fixes bug 22781; bugfix on 0.3.2.1-alpha.
2019-03-12 11:09:53 -04:00
Nick Mathewson c01c6123fa Merge remote-tracking branch 'tor-github/pr/779' 2019-03-12 11:05:27 -04:00
Nick Mathewson 1c9b629284 Merge branch 'maint-0.4.0' 2019-03-12 11:03:47 -04:00
Nick Mathewson 9c9214f2c9 Merge remote-tracking branch 'tor-github/pr/776' into maint-0.4.0 2019-03-12 11:03:37 -04:00
Nick Mathewson a6dd893e76 Fix shellcheck warnings in pull-all/merge-all scripts
This appears at first glance to be a shellcheck bug.

Closes 29747.  Bugfix not in any released Tor.
2019-03-12 10:50:54 -04:00
teor dfc3e552a3 test/sr: update sr_state_free() to sr_state_free_all()
The function name changed between 0.2.9 and 0.3.4.
2019-03-12 11:34:52 +10:00
teor c7854933e9 Merge branch bug29706_029_refactor into bug29706_034_refactor 2019-03-12 11:31:52 +10:00
teor 9eeff921ae sr: BUG() on NULL sr_state before doing a state_query_*()
Part of #29706.
2019-03-12 11:14:30 +10:00
teor 0cca554110 sr: Check for replacing a SRV pointer with the same pointer
Check if the new pointer is the same as the old one: if it is, it's
probably a bug:
* the caller may have confused current and previous, or
* they may have forgotten to sr_srv_dup().

Putting NULL multiple times is allowed.

Part of 29706.
2019-03-12 11:14:30 +10:00
Nick Mathewson 733afb52a8 Merge branch 'maint-0.4.0' 2019-03-11 09:45:48 -04:00
Nick Mathewson a9c84bfd35 Merge remote-tracking branch 'tor-github/pr/756' into maint-0.4.0 2019-03-11 09:45:31 -04:00
rl1987 4773fa6474 Revert "Walk back from requiring bash"
This reverts commit c346eff223.
2019-03-10 18:16:58 +02:00
teor 593fde930f sr: rename srv_dup() to sr_srv_dup() 2019-03-09 12:03:12 +10:00
teor 26e6f56023 sr: Free SRVs before replacing them in state_query_put_()
Refactor the shared random state's memory management so that it actually
takes ownership of the shared random value pointers.

Fixes bug 29706; bugfix on 0.2.9.1-alpha.
2019-03-09 12:03:00 +10:00
teor 9400da9b5e test/sr: Free SRVs before replacing them in test_sr_setup_srv()
Stop leaking parts of the shared random state in the shared-random unit
tests. The previous fix in 29599 was incomplete.

Fixes bug 29706; bugfix on 0.2.9.1-alpha.
2019-03-09 11:59:52 +10:00
Nick Mathewson 911f95ed92 Merge branch 'maint-0.4.0' 2019-03-08 10:25:57 -05:00
Nick Mathewson c40d53ab39 Merge branch 'pr_719_squashed_040' into maint-0.4.0 2019-03-08 10:25:43 -05:00
Mike Perry ff410edec0 Bug 29204: Inspect circuit queues before sending padding.
Mitigates OOM conditions at relays.
2019-03-08 10:25:28 -05:00
Nick Mathewson e47e60c12e Merge branch 'pr_719_squashed' 2019-03-08 10:24:00 -05:00
Mike Perry cd67911033 Bug 29204: Inspect circuit queues before sending padding.
Mitigates OOM conditions at relays.
2019-03-08 10:23:47 -05:00
Nick Mathewson 8fd20df455 Merge remote-tracking branch 'tor-github/pr/743' 2019-03-08 10:07:25 -05:00
teor df279880f8 Merge branch 'maint-0.4.0' 2019-03-08 14:12:00 +10:00
teor 968d2b87cb Merge branch 'maint-0.3.5' into maint-0.4.0 2019-03-08 14:11:46 +10:00
teor ffd7207025 Merge remote-tracking branch 'tor-github/pr/733' into maint-0.3.5 2019-03-08 14:11:14 +10:00