Commit Graph

33567 Commits

Author SHA1 Message Date
teor
22c33ea7f7
practracker: Fix a typo in the usage message
Fixes bug 31828; bugfix on 0.4.2.1-alpha.
2019-09-24 14:37:43 +10:00
teor
ab7bfdf404
backtrace: Add a missing check for HAVE_PTHREAD_H before using mutexes
Fixes bug 31614; bugfix on 0.2.5.2-alpha.
2019-09-24 13:35:55 +10:00
teor
6b97a5a843
backtrace: Disable signal handlers in remove_bt_handler()
Fixes bug 31614; bugfix on 0.2.5.2-alpha.
2019-09-24 13:35:48 +10:00
teor
c7c849bba8
configure: Explain --disable-module-dirauth better
Explain what the optional Directory Authority module is, and what
happens when it is disabled.

Fixes bug 31825; bugfix on 0.3.4.1-alpha.
2019-09-24 11:29:22 +10:00
teor
83fa962c1a
test: a file with no config options, at the end of an %include directory
(The file must contain whitespace or comments to trigger the bug.)

Regression test for 31408.
2019-09-24 11:10:50 +10:00
teor
876b3e2775
Merge branch 'bug31408_035' into bug31408_master 2019-09-24 11:07:38 +10:00
teor
0614f83905
changes: use correct bugfix release, and reword changes file for 31408 2019-09-24 11:06:20 +10:00
Roger Dingledine
e1429d9148 fix typo in comment 2019-09-23 18:32:05 -04:00
Nick Mathewson
49a11f8a8a Try using make -k in the Appveyor configuration
Frequently, when a patch fails, it has failures in several files.
Using the "-k" flag will let us learn all the compilation errors,
not just the first one that the compiler hits.

Based on a patch by rl1987.

Closes ticket 31372.
2019-09-23 15:08:34 -04:00
Nick Mathewson
6ed3d8dbd1 Try using make -k in Travis configuration
Frequently, when a patch fails, it has failures in several files.
Using the "-k" flag will let us learn all the compilation errors,
not just the first one that the compiler hits.

Based on a patch by rl1987.
2019-09-23 15:05:08 -04:00
AmreshVenugopal
3e45260594 fix: Ticket #31589
- The function `decrypt_desc_layer` has a cleaner interface.
- `is_superencrypted_layer` changed from `int` -> `bool`

[ticket details](https://trac.torproject.org/projects/tor/ticket/31589)

add(changes/*): changes file
fix(src/features/hs): is_superencrypted changed from `int` -> `bool`
fix(changes/ticket31589): header
add(changes/ticket31589): subsystem(onion services) to change
2019-09-23 23:52:01 +05:30
Nick Mathewson
16890839d3 annotate_ifdef_directives: obey an 80-column line-limit
If we would add a comment making a line longer than 80 columns,
instead truncate the variable portion of the comment until it just
fits into 80 columns, with an ellipsis.
2019-09-23 08:48:53 -04:00
Nick Mathewson
f36e743e5d annotate_ifdef_directives: introduce a function to make commented lines
No functional change in this commit.
2019-09-23 08:48:53 -04:00
Nick Mathewson
0b367f3386 Add comments to annotate_ifdef_directives 2019-09-23 08:48:53 -04:00
Daniel Pinto
15490816da
Fix bug when %including folder with comment only files. #31408
When processing a %included folder, a bug caused the pointer to
the last element of the options list to be set to NULL when
processing a file with only comments or whitepace. This could
cause options from other files on the same folder to be
discarded depending on the lines after the affected %include.
2019-09-23 10:39:08 +10:00
Nick Mathewson
c309169217 microdesc_parse: convert some ints to bools
Noted by ahf during review of #31675
2019-09-19 14:37:24 -04:00
Nick Mathewson
6100378c29 changes file for microdesc_parse refactoring. 2019-09-19 14:37:24 -04:00
Nick Mathewson
2e1989dacc Remove practracker exception for microdesc parsing function 2019-09-19 14:37:24 -04:00
Nick Mathewson
194884977c microdesc_parse: Rename "next" label to "err". 2019-09-19 14:37:24 -04:00
Nick Mathewson
2094796c24 Reindent microdesc_parse_fields().
I suggest reviewing this with -b: it should be whitespace-only.
2019-09-19 14:37:24 -04:00
Nick Mathewson
ec368409fa Extract field-parsing code for microdesc_parse.c
The code here parses the fields from the microdescriptor, including
possible annotations, and stores them into a microdesc_t object.

This commit is almost pure code movement; I recommend using
--color-moved to review it.
2019-09-19 14:37:24 -04:00
Nick Mathewson
b1552e8814 Reindent microdesc_extract_body().
This commit is whitespace-only; I suggest reviewing with -b.
2019-09-19 14:37:24 -04:00
Nick Mathewson
9cbc166ea0 Extract the body-copying portion of microdesc parsing
This code is logically independent of the rest of the function, and
goes better in its own function.

This is almost purely code movement; I suggest reviewing with
--color-moved.
2019-09-19 14:37:24 -04:00
Nick Mathewson
e6c5b248ae Merge branch 'maint-0.4.1'
"ours" to avoid version bump
2019-09-19 08:52:42 -04:00
Nick Mathewson
6f3f93d86c bump to 0.4.1.6-dev 2019-09-19 08:52:15 -04:00
Nick Mathewson
b01bd73d92 Copy 0.4.1.6 block into changelog/releasenotes in master 2019-09-19 08:38:50 -04:00
teor
69a1f9c8a7
test: test dirserv_router_has_valid_address() with DirAllowPrivateAddresses
Part of 31793.
2019-09-19 16:19:19 +10:00
teor
c2ceede376
test: refactor dirserv_router_has_valid_address() tests
Cleanup after 31793.
2019-09-19 16:19:16 +10:00
teor
03c2b1be8d
dirauth: reorder the checks in dirserv_router_has_valid_address()
To avoid a bug warning.

Fixes 31793. Bug not in any release, no changes file required.
2019-09-19 16:19:12 +10:00
teor
46fea1dfee
test: dirserv_router_has_valid_address() with zero-family addresses
Sometimes tor doesn't initialise an address, so its family is zero.

Failing test for 31793. Future commits will fix the code.
2019-09-19 16:19:04 +10:00
Nick Mathewson
37c616aeaf Merge branch 'bug31466_035' into bug31466_042 2019-09-18 15:48:25 -04:00
Nick Mathewson
bf4a27c0ea Merge branch 'bug31466_029' into bug31466_035_tmp 2019-09-18 15:42:40 -04:00
Nick Mathewson
f0e4120996 Add a rate-limit to our warning about the disabled .exit notation
This warning would previously be given every time we tried to open a
connection to a foo.exit address, which could potentially be used to
flood the logs.  Now, we don't allow this warning to appear more
than once every 15 minutes.

Fixes bug 31466; bugfix on 0.2.2.1-alpha, when .exit was first
deprecated.
2019-09-18 15:38:33 -04:00
Nick Mathewson
387cfccee4 Add a coccinelle script to look for {inc,dec}rements in log_debug
We want to forbid this pattern since, unlike the other log_*()
macros, log_debug() conditionally evaluates its arguments only if
debug-level logging is enabled.  Thus, a call to
    log_debug("%d", x++);
will only increment x if debugging logs are enabled, which is
probably not what the programmer intended.

One bug caused by this pattern was #30628.

This script detects log_debug( ) calls with any of E++, E--, ++E,
or --E in their arguments, where E is an arbitrary expression.

Closes ticket 30743.
2019-09-18 13:43:42 -04:00
Nick Mathewson
4bbefc2aac Merge branch 'bug30916_035' into bug30916_041 2019-09-18 11:19:41 -04:00
Nick Mathewson
2da4d64a64 Avoid a crash if our "current" and "old" ntor onion keys are equal
Our dimap code asserts if you try to add the same key twice; this
can't happen if everything is running smoothly, but it's possible if
you try to start a relay where secret_onion_key_ntor is the same as
secret_onion_key_ntor.old.

Fixes bug 30916; bugfix on 0.2.4.8-alpha when ntor keys were
introduced.
2019-09-18 11:14:45 -04:00
Nick Mathewson
1e9488f2fd Extract expressions in construct_ntor_key_map()
No behavioral change here: this is just refactoring.
2019-09-18 11:12:43 -04:00
Nick Mathewson
82ad63ef40 changes file for 31338 2019-09-18 10:28:33 -04:00
Nick Mathewson
1c67d261d5 practracker: Integration test for --list-overbroad
Make sure that we list overbroad exceptions, and nothing else
2019-09-18 10:28:33 -04:00
Nick Mathewson
d1ffac3f8a practracker: An exception is "used" even when it is violated.
The purpose of tracking whether an exception is used is so that we
can tell whether it is overbroad.  This means that an _underbroad_
exception is still a used one.  Fixes bug 31338.
2019-09-18 10:28:33 -04:00
Nick Mathewson
25d55fa01e Practracker: do not list problems when told to --list-overbroad. 2019-09-18 10:28:33 -04:00
Nick Mathewson
d6d3e829dd Merge branch 'maint-0.4.1' 2019-09-18 08:07:56 -04:00
Nick Mathewson
70bcff6010 Merge branch 'bug31772_041' into maint-0.4.1 2019-09-18 08:07:50 -04:00
Nick Mathewson
7225cfc586 Merge branch 'maint-0.4.1' 2019-09-17 21:28:38 -04:00
Nick Mathewson
5f00c03ed0 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-09-17 21:28:38 -04:00
Nick Mathewson
9e674d0eb4 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-09-17 21:28:37 -04:00
Nick Mathewson
02840169d8 Merge remote-tracking branch 'tor-github/pr/1300' into maint-0.3.5 2019-09-17 21:28:29 -04:00
Nick Mathewson
2013e63acc Merge branch 'maint-0.4.1' 2019-09-17 21:26:32 -04:00
Nick Mathewson
c3e94a8ccd Merge branch 'maint-0.4.0' into maint-0.4.1 2019-09-17 21:26:32 -04:00
Nick Mathewson
a1f97bb253 Merge branch 'maint-0.3.5' into maint-0.4.0 2019-09-17 21:26:31 -04:00