Commit Graph

34383 Commits

Author SHA1 Message Date
Nick Mathewson f007437292 Further clarify our clarification about the type of POSINT 2019-06-24 17:50:43 -04:00
Nick Mathewson c60a85d22a Add a "typed_var" abstraction to implement lvalue access in C.
Right now, this has been done at a high level by confparse.c, but it
makes more sense to lower it.

This API is radically un-typesafe as it stands; we'll be wrapping it
in a safer API as we do #30914 and lower the struct manipulation
code as well.

Closes ticket 30864.
2019-06-24 17:50:43 -04:00
Nick Mathewson 5a2ab886ba Add a function to append an existing line to a config line list.
We had an existing function to do this, but it took a pair of
strings rather than a line.
2019-06-24 15:11:57 -04:00
Nick Mathewson 458da8a80d Move unit-parsing code to src/lib/confmgt
lib/confmgt is at a higher level than lib/conf, since it needs to
call down to logging and similar modules.
2019-06-24 15:11:57 -04:00
Nick Mathewson 246599abb4 Start moving types that will be used for config vars to lib/conf
This will be a lower-level module than anything that actually
sets or handles configuration variables.

Part of 30864.
2019-06-24 15:11:57 -04:00
Nick Mathewson 81d16d8d0c checkSpace.pl: Allow 'bool' before a space and an open-paren
We need this so we can declare function pointers returning bool
without upsetting our style checker. :/
2019-06-24 15:11:57 -04:00
Nick Mathewson 4bac6b6e7d Remove the unused "exitcode" variable from test_rebind.sh
Fixes a shellcheck issue; closes ticket 30964.  No user-visible
change.
2019-06-24 13:49:19 -04:00
Nick Mathewson a87700633c Don't try to shellcheck src/rust/registry
Fixes bug 30963; bug not in any released Tor.
2019-06-24 13:45:05 -04:00
Nick Mathewson aec359ef62 Merge branch 'maint-0.4.1' 2019-06-24 13:36:42 -04:00
Nick Mathewson bd66a40845 Merge remote-tracking branch 'tor-github/pr/1131' 2019-06-24 13:36:36 -04:00
Nick Mathewson 8803930de8 Merge remote-tracking branch 'tor-github/pr/1130' into maint-0.4.1 2019-06-24 13:36:10 -04:00
Nick Mathewson 3b6bd768d3 Merge branch 'maint-0.4.1'
"ours" to avoid version bump.
2019-06-24 09:32:54 -04:00
Nick Mathewson aab5f42ae0 bump to 0.4.1.3-alpha 2019-06-24 09:32:46 -04:00
teor d9f49e9bc1 Merge branch 'bug30958_040' into bug30958_041 2019-06-24 21:31:27 +10:00
teor e350dfc085 Merge branch 'bug30958_035' into bug30958_040 2019-06-24 21:31:10 +10:00
teor b7dda83cfa Merge branch 'bug30958_029' into bug30958_035 2019-06-24 21:30:47 +10:00
teor 5beb32d3d9 stats: Stop removing the ed25519 signature if the extra info file is too big
If the signature data was removed, but the keyword was kept, this could
result in an unparseable extra info file.

Fixes bug 30958; bugfix on 0.2.7.2-alpha.
2019-06-24 21:30:03 +10:00
teor 45be44ed9c stats: Split extrainfo_dump_to_string() into smaller functions.
Closes ticket 30956.
2019-06-24 20:47:44 +10:00
teor 872b85e689 Merge branch 'bug30956_041' into bug30956_master 2019-06-24 19:47:34 +10:00
teor 8356cc5b51 stats: Always publish pluggable transports in extra info documents
Always publish bridge pluggable transport information in the extra info
descriptor, even if ExtraInfoStatistics is 0. This information is
needed by BridgeDB.

Fixes bug 30956; bugfix on 0.4.1.1-alpha.
2019-06-24 19:44:24 +10:00
rl1987 84f0f15066 Improve comment in .travis.yml 2019-06-23 14:12:05 +03:00
rl1987 a52e00b5b3 Fix shellcheck warning SC2034 in test_rebind.sh.
Bugfix on be0a4be276 (not in any Tor release).
2019-06-23 14:00:43 +03:00
rl1987 1d504a408d Add changes file 2019-06-23 13:38:49 +03:00
rl1987 f9de9052e1 On Travis, put random data in ~/.torrc 2019-06-23 13:31:47 +03:00
Nick Mathewson 70415c9f72 Merge branch 'maint-0.4.1'
"ours" merge to avoid taking pracktracker removal.
2019-06-19 14:29:22 -04:00
Nick Mathewson 4ecd09cfb7 remove practracker from check-local (0.4.1 only) 2019-06-19 14:29:08 -04:00
David Goulet f2b1eb1f05 hs: Disallow single hop client circuit when introducing
This will effectively also deny any bridge to be used as a single hop to the
introduction point since bridge do not authenticate like clients.

Fixes #24963

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 11:17:58 -04:00
David Goulet 8751176687 hs-v3: Close intro circuits when cleaning client cache
Fixes #30921

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 09:22:07 -04:00
David Goulet 91c7d395cf changes: Fix typo in changes/ticket30893
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:50:02 -04:00
David Goulet e6579d801f Merge branch 'tor-github/pr/1113' 2019-06-19 07:47:03 -04:00
David Goulet 9644f3462a Make the great grand practracker happy...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:42:30 -04:00
David Goulet 16a0b7ed67 guard: Ignore marked for close circuit when changing state to open
When we consider all circuits in "waiting for guard" state to be promoted to
an "open" state, we were considering all circuits, even the one marked for
close.

This ultiamtely triggers a "circuit_has_opened()" called on the circuit that
is marked for close which then leads to possible undesirable behaviors within
a subsystem.

For instance, the HS subsystem would be unable to find the authentication key
of the introduction point circuit leading to a BUG() warning and a duplicate
mark for close on the circuit.

This commit also adds a unit test to make sure we never select marked for
close circuits when upgrading its guard state from waiting for guard to open.

Fixes #30871

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:42:30 -04:00
David Goulet 05b6f73f12 Make the great grand practracker happy...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:41:45 -04:00
David Goulet 6a0763cd66 guard: Ignore marked for close circuit when changing state to open
When we consider all circuits in "waiting for guard" state to be promoted to
an "open" state, we were considering all circuits, even the one marked for
close.

This ultiamtely triggers a "circuit_has_opened()" called on the circuit that
is marked for close which then leads to possible undesirable behaviors within
a subsystem.

For instance, the HS subsystem would be unable to find the authentication key
of the introduction point circuit leading to a BUG() warning and a duplicate
mark for close on the circuit.

This commit also adds a unit test to make sure we never select marked for
close circuits when upgrading its guard state from waiting for guard to open.

Fixes #30871

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:41:45 -04:00
David Goulet e3f3478032 guard: Ignore marked for close circuit when changing state to open
When we consider all circuits in "waiting for guard" state to be promoted to
an "open" state, we were considering all circuits, even the one marked for
close.

This ultiamtely triggers a "circuit_has_opened()" called on the circuit that
is marked for close which then leads to possible undesirable behaviors within
a subsystem.

For instance, the HS subsystem would be unable to find the authentication key
of the introduction point circuit leading to a BUG() warning and a duplicate
mark for close on the circuit.

This commit also adds a unit test to make sure we never select marked for
close circuits when upgrading its guard state from waiting for guard to open.

Fixes #30871

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-06-19 07:40:05 -04:00
Nick Mathewson 125a6300da Merge remote-tracking branch 'tor-github/pr/1115' 2019-06-18 09:10:34 -04:00
Nick Mathewson 93ca08d66c Merge branch 'ticket29533_squashed' 2019-06-17 08:56:13 -04:00
rl1987 86478be50f Add changes file 2019-06-17 08:56:06 -04:00
rl1987 e8da65ee91 Fix SC2034 in pre-push.git-hook 2019-06-17 08:56:06 -04:00
rl1987 19dbd431c5 Shellcheck all the scripts 2019-06-17 08:56:02 -04:00
Nick Mathewson 52d386c9b0 Merge remote-tracking branch 'tor-github/pr/1100' 2019-06-17 08:54:12 -04:00
rl1987 66a15013fa Allow excluding documentation from the build 2019-06-16 20:21:30 +03:00
Nick Mathewson 7c6cc470f1 Merge branch 'bug30894_035' into ticket30893 2019-06-15 16:50:02 -04:00
Nick Mathewson 4613159c61 Changes file for ticket 30893 (confparse testing) 2019-06-15 16:49:18 -04:00
Nick Mathewson 26436fb1b6 Add more unit tests for confparse.c, so we can refactor.
This set of tests gets the line coverage to 100%.
2019-06-15 16:49:18 -04:00
Nick Mathewson 4ab1d1c0c4 Fix memleak when failing to parse a CSV_INTERVAL.
Fixes bug 30894; bugfix on 0.3.4.1-alpha
2019-06-15 16:47:16 -04:00
Nick Mathewson fe9d15cf4b Remove the PORT configuration type: nothing uses it.
All of our port configurations now use an extended format.
2019-06-15 11:30:24 -04:00
Nick Mathewson ac5e44d9ce Renaming: CONFIG_TYPE_UINT -> CONFIG_TYPE_POSINT
This name has been a historical source of confusion, since "uint"
usually suggests "unsigned int" to people, when the real type is
"nonnegative int".
2019-06-15 11:28:19 -04:00
George Kadianakis 319ce22581 Merge branch 'bug30806' 2019-06-14 13:28:32 +03:00
Nick Mathewson 990b434c4f Make evloop into a subsystem.
Note that the event base object is _not_ created from the initialize
function, since it is configuration-dependent.  This will wait until
configuration is integrated into subsystems.

Closes ticket 30806.
2019-06-14 13:28:10 +03:00