David Goulet
cfc60e566c
circ: Add an handle to circuit_t
...
Closes #32343
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-30 16:12:56 -04:00
Nick Mathewson
5a1dfca071
Fix 32167: comment in config.c
2019-10-30 16:05:48 -04:00
Nick Mathewson
14831ea0ab
Use FILENAME to determine which options to check for relative paths
...
This is part of ticket 32344.
2019-10-30 15:32:12 -04:00
Nick Mathewson
15371d801c
Mark more torrc options as FILENAME rather than as STRING.
...
This will help us reimplement warn_about_relative_paths().
FILENAME options currently are the same as STRINGs in most respects,
except for the type reported to the controller.
In this commit, I'm picking the options to change based on:
* the current contents of warn_about_relative_paths()
* options that end with "File".
2019-10-30 15:14:05 -04:00
Nick Mathewson
b985cf2403
Use CFLG_IMMUTABLE to replace much of the options transition cb.
...
Closes ticket 32344.
2019-10-30 15:05:26 -04:00
Nick Mathewson
2a2c7049b8
Add a CFLG_IMMUTABLE flag to mark a field as unchangeable.
2019-10-30 15:00:53 -04:00
teor
183f9e490f
test: Fix a comment typo in src/test/test_hs_ntor.sh
2019-10-31 00:43:13 +10:00
teor
861b9366df
test: Fix a loop variable bug in test_parseconf.sh
...
Obviously correct fixes to already reviewed code.
No changes file required: not in any released version of tor.
2019-10-31 00:23:30 +10:00
David Goulet
f579541f13
Merge branch 'tor-github/pr/1468'
2019-10-30 08:53:51 -04:00
Neel Chauhan
f81e4aa831
hs-v2: Lookup intro failure cache when picking an intro from descriptor
...
When picking an intro point from the service descriptor, the client failed to
lookup the failure cache.
It made an HS v2 client re-pick bad intro points for which we already know it
won't work in the first place.
Based on Neel Chauhan original patch.
Fixes #25568
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-30 08:47:21 -04:00
teor
dce1f63d44
fs: Clarify an ambiguous comment about string/pointer equality
2019-10-30 16:15:43 +10:00
Taylor Yu
1e8ddbe1ee
Changes file for ticket 32277
2019-10-29 16:39:03 -05:00
Taylor Yu
5e4ae73051
Reformat some options in tor.1.txt
...
Reformat command line options in tor.1.txt to display as fixed-width
in the HTML version. Based on a patch by Swati Thacker. Part of
ticket 32277.
2019-10-29 16:39:03 -05:00
Taylor Yu
8660a32d18
Reword command-options in tor.1.txt
...
Reword the COMMAND-LINE OPTIONS section of tor.1.txt. Based on a
patch by Swati Thacker. Part of ticket 32277.
2019-10-29 16:39:03 -05:00
Taylor Yu
90ba8bae3f
Reword DESCRIPTION in tor.1.txt
...
Reword the DESCRIPTION section of tor.1.txt.
Based on a patch by Swati Thacker. Part of ticket 32277.
2019-10-29 16:39:03 -05:00
Taylor Yu
4c38fccb9b
Move command-line conf option description earlier
...
In tor.1.txt, move the paragraphs at the end of the COMMAND-LINE
OPTIONS section earlier. This text describes how the user can specify
configuration options on the command line.
Also clarify some wording and formatting.
Based on a patch by Swati Thacker. Part of ticket 32277.
2019-10-29 16:39:03 -05:00
George Kadianakis
4413b98190
Merge branch 'tor-github/pr/1456'
2019-10-29 21:29:13 +08:00
teor
30705e8294
app/config: Fix a comment typo in config.c
...
The options validation is now a callback.
Bugfix on 31241; not in any released version of tor.
2019-10-29 12:40:20 +10:00
teor
b448f6044d
Merge branch 'maint-0.4.2'
2019-10-29 08:27:02 +10:00
teor
2395800d3e
Merge branch 'maint-0.4.1' into maint-0.4.2
2019-10-29 08:26:55 +10:00
teor
63aff4a43e
Merge branch 'maint-0.4.0' into maint-0.4.1
2019-10-29 08:26:48 +10:00
teor
54e2d0dc2d
Merge branch 'maint-0.3.5' into maint-0.4.0
2019-10-29 08:26:40 +10:00
teor
15d67842f9
Merge branch 'maint-0.2.9' into maint-0.3.5
2019-10-29 08:26:32 +10:00
teor
752c35ca96
Merge remote-tracking branch 'tor-github/pr/1460' into maint-0.2.9
2019-10-29 08:23:35 +10:00
David Goulet
d67db64ced
changes: Add file for ticket 32196
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:21:08 -04:00
David Goulet
ceca6e7c35
ewma: Implement unit tests
...
At this commit, 93.9% of line coverage and 95.5% of function coverage.
Closes #32196
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
48781c32ca
ewma: Move private struct into header private section
...
Facilitate testing.
Part of #32196 .
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
bbcded554a
test: Implement unit tests for circuitmux.c
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
dba249bc73
test: Add fakecircs.{h|c} helper
...
Fake circuits are created everywhere in the unit tests. This is an attempt at
centralizing a "fake circuit creation" API like fakechans.c does for channel.
This commit introduces fakecircs.c and changes test_relay.c and
test_circpadding.c which were using roughly the same code.
This will allow easier OR circuit creation for the future tests in
test_circuitmux.c
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
a41ec84914
test: Implement cmux allocate unit test
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
d2e51aca7d
test: Remove circuitmux/destroy_cell_queue code duplication
...
This also rename a function to improve code clarity.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
839bc4814e
test: Add testcase setup object for test_cmux
...
Also remove a scheduler_init() from a test and MOCK the appropriate function
so the test can pass.
This is done in order to minimize initialization functions in the unit test
and try to only go through the testcase setup object.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
7678022e85
cmux: Move circuitmux_s object into header in private section
...
Step needed in order to access members of the object for unit tests.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
David Goulet
4c95022658
core: Add missing include in destroy_cell_queue_st.h
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-28 13:17:11 -04:00
teor
bf16efeb07
nodelist: fix a comment typo in routerset.h
2019-10-28 23:44:08 +10:00
David Goulet
b98631d280
Merge branch 'tor-github/pr/1476'
2019-10-28 08:47:57 -04:00
Nick Mathewson
25d66a3391
add missing docs in crypto_digest*
2019-10-28 08:27:42 -04:00
Nick Mathewson
4d2c8ca338
Merge branch 'config_macros_doc_cleanup'
2019-10-28 07:31:42 -04:00
José M. Guisado
42ba3997d6
Check memunit parsing for overflow in confparse
...
Before, when parsing memunits, if overflow occured it failed silently.
Use nowrap u64 math to detect overflow, compare to INT64_MAX and if
greater tell user and fail accordingly.
15000000.5 TB fails double check as it a greater floating number than
(double)INT64_MAX
8388608.1 TB passes double check because it falls in the same value as
(double)INT64_MAX (which is 2^63), but will fail the int check because
(uint64_t)d, which is 2^63, is strictly greater than 2^63-1 (INT64_MAX).
Fixes #30920
Signed-off-by: José M. Guisado <guigom@riseup.net>
2019-10-28 11:38:41 +01:00
teor
3479024cb1
scripts: Change to the top source directory as needed
...
Bugfix on 31919; not in any released version of tor.
2019-10-28 13:28:50 +10:00
teor
18e09913bf
practracker: Don't read editor temp files
...
(Or any dot files.)
Obviously correct changes to already-reviewed code.
2019-10-28 13:09:58 +10:00
teor
68befa3b84
scripts/git: Fix a shellcheck error in pre-commit.git-hook
...
Some versions of shellcheck do not detect this error.
Bugfix on 31919; not in any released version of tor.
2019-10-28 13:04:29 +10:00
José M. Guisado
f237529fff
Add nowrap u64 multiplication function
...
Follows #30920
Signed-off-by: José M. Guisado <guigom@riseup.net>
2019-10-27 10:27:54 +01:00
Nick Mathewson
f751cc020f
Documentation cleanup in confmacros.h
2019-10-26 17:24:22 -04:00
Nick Mathewson
bc4b9d7df4
Changes file for ticket 32307.
2019-10-26 12:09:09 -04:00
Nick Mathewson
b314b68d61
Fix doxygen HTML warnings in src/feature.
2019-10-26 12:07:09 -04:00
Nick Mathewson
68f8086041
doxygen: add @file declarations for src/feature/
...
If a file doesn't use the file command (either \file or @file),
Doxygen won't try to process it.
2019-10-26 12:05:28 -04:00
Nick Mathewson
30c6ab5150
doxygen: add @file declarations for src/app
...
If a file doesn't use the file command (either \file or @file),
Doxygen won't try to process it.
2019-10-26 11:41:43 -04:00
Nick Mathewson
5f299feb82
doxygen: add @file declarations for src/core/crypto
...
If a file doesn't use the file command (either \file or @file),
Doxygen won't try to process it.
2019-10-26 11:39:17 -04:00
Nick Mathewson
ff7a70ca09
doxygen: add @file declarations for src/core/or
...
If a file doesn't use the file command (either \file or @file),
Doxygen won't try to process it.
2019-10-26 11:37:25 -04:00