teor
a18e84ad01
config: Improve some function comments
2019-10-31 11:11:51 +10:00
teor
4666ca73a1
config: Give warn_about_relative_paths() const args
...
Also gives make_path_absolute() const args.
Obviously correct fixes to already reviewed code.
2019-10-31 10:53:26 +10:00
Nick Mathewson
a6ad26fd5f
Merge remote-tracking branch 'tor-github/pr/1485'
2019-10-30 16:16:12 -04:00
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
JeremyRand
b69e85cc3d
Bug 19859: Add unit test for formatting
2019-10-27 05:14:26 +00:00
JeremyRand
56ee42e1c9
Bug 19859: Add HTTPCONNECT client protocol
2019-10-27 05:14:21 +00:00
JeremyRand
23819d3a66
Bug 19859: Set arg to const
2019-10-27 03:06:19 +00:00
JeremyRand
0c4e3b6b50
Bug 19859: Consolidate flag fields into ISO_FIELDS
2019-10-27 01:54:11 +00:00