]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
7 years agodirvote: Free vote commits in the dirauth module
David Goulet [Wed, 25 Apr 2018 14:49:32 +0000 (10:49 -0400)] 
dirvote: Free vote commits in the dirauth module

In order to make sr_commit_free() only used by the dirauth module, this
commits moves the commits free from a vote object into the dirvote.c file
which is now only for the module.

The function does nothing if the module is disabled.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodirvote: Move SR commit parsing into dirauth module
David Goulet [Wed, 25 Apr 2018 14:42:56 +0000 (10:42 -0400)] 
dirvote: Move SR commit parsing into dirauth module

When parsing a vote in routerparse.c, only dirauth extract the commits from
the vote so move all this code into dirvote.c so we can make it specific to
the dirauth module.

If the dirauth module is disabled, the commit parsing does nothing.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agons: Move ns_detached_signatures_free() to networkstatus.c
David Goulet [Wed, 25 Apr 2018 14:09:50 +0000 (10:09 -0400)] 
ns: Move ns_detached_signatures_free() to networkstatus.c

From dirvote.c to networkstatus.c where it makes more sense both in terms of
namespace and subsystem responsability.

This removes one less dependency on the dirauth module.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodirvote: Rename authority_cert_dup()
David Goulet [Wed, 25 Apr 2018 14:05:30 +0000 (10:05 -0400)] 
dirvote: Rename authority_cert_dup()

Renamed to follow the file namespace.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodirvote: Rename voter_get_sig_by_algorithm()
David Goulet [Wed, 25 Apr 2018 14:00:17 +0000 (10:00 -0400)] 
dirvote: Rename voter_get_sig_by_algorithm()

In order to follow the public namespace of dirvote.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodirvote: Extract shared functions to common file
David Goulet [Wed, 25 Apr 2018 13:06:29 +0000 (09:06 -0400)] 
dirvote: Extract shared functions to common file

No code behavior change.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agosr: Static inline functions if no dirauth module
David Goulet [Tue, 24 Apr 2018 19:28:47 +0000 (15:28 -0400)] 
sr: Static inline functions if no dirauth module

Add static inline dirauth public functions used outside of the dirauth module
so they can be seen by the tor code but simply do nothing.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agosr: Extract shared SR functions
David Goulet [Tue, 24 Apr 2018 15:34:31 +0000 (11:34 -0400)] 
sr: Extract shared SR functions

Move most of the shared random functions that are needed outside of the
dirauth module.

At this commit, because dirvote.c hasn't been refactor, it doesn't compile
because some SR functions need a dirvote function.

Furthermore, 5 functions haven't been touched yet because they are dirauth
only but are in used in other C files than the dirauth module ones.

No code behavior change. Only moving code around.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomod: Move dirauth specific files to its own module
David Goulet [Thu, 5 Apr 2018 18:27:30 +0000 (14:27 -0400)] 
mod: Move dirauth specific files to its own module

This is a pretty big commit but it only moves these files to src/or/dirauth:

  dircollate.c dirvote.c shared_random.c shared_random_state.c
  dircollate.h dirvote.h shared_random.h shared_random_state.h

Then many files are modified to change the include line for those header files
that have moved into a new directory.

Without using --disable-module-dirauth, everything builds fine. When using the
flag to disable the module, tor doesn't build due to linking errors. This will
be addressed in the next commit(s).

No code behavior change.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodirvote: Reorganize the dirvote.h file
David Goulet [Thu, 5 Apr 2018 15:38:37 +0000 (11:38 -0400)] 
dirvote: Reorganize the dirvote.h file

Remove useless include.

Clearly identify functions that are used by other part of Tor, functions that
are only used by the dirauth subsystem and functions that are exposed for unit
tests.

This will help us in the dirauth modularization effort.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodirvote: Move voting_schedule_t to dirvote.c
David Goulet [Thu, 5 Apr 2018 15:27:39 +0000 (11:27 -0400)] 
dirvote: Move voting_schedule_t to dirvote.c

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agodirvote: Trim down the public API
David Goulet [Thu, 5 Apr 2018 15:18:47 +0000 (11:18 -0400)] 
dirvote: Trim down the public API

Many functions become static to the C file or exposed to the tests within the
PRIVATE define of dirvote.h.

This commit moves a function to the top. No code behavior change.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoconfig: Make circuit_build_times_disabled() use authdir_mode()
David Goulet [Thu, 5 Apr 2018 13:17:12 +0000 (09:17 -0400)] 
config: Make circuit_build_times_disabled() use authdir_mode()

Don't access the AuthoritativeDir options directly. We do this so we can move
authdir_mode() to the dirauth module.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomod: Build system changes for dirauth module
David Goulet [Tue, 3 Apr 2018 19:06:34 +0000 (15:06 -0400)] 
mod: Build system changes for dirauth module

Make our build system support a disable dirauth module option. It can only be
disabled explicitly with:

  $ ./configure --disable-module-dirauth

If *not* specified that is enabled, an automake conditional variable is set to
true and a defined value for the C code:

  AM_CONDITIONAL: BUILD_MODULE_DIRAUTH
  AC_DEFINE: HAVE_MODULE_DIRAUTH=1

This introduces the dirauth/ module directory in src/or/ for which .c files
are only compiled if the BUILD_MODULE_DIRAUTH is set.

All the header files are compiled in regardless of the support so we can use
the alternative entry point functions of the dirauth subsystem.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'ticket25376_034_031_squashed'
Nick Mathewson [Fri, 27 Apr 2018 13:28:43 +0000 (09:28 -0400)] 
Merge branch 'ticket25376_034_031_squashed'

7 years agohibernation: Rescan the event list on state change
David Goulet [Thu, 26 Apr 2018 19:00:19 +0000 (15:00 -0400)] 
hibernation: Rescan the event list on state change

When we change the hibernation state, rescan the main loop event list because
the new state might affect the events.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomain: Add mainloop callback event flags
David Goulet [Thu, 26 Apr 2018 18:20:31 +0000 (14:20 -0400)] 
main: Add mainloop callback event flags

Implement the ability to set flags per events which influences the set up of
the event.

This commit only adds one flag which is "need network" meaning that the event
is not enabled if tor has disabled the network or if hibernation mode.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'ticket25933'
Nick Mathewson [Thu, 26 Apr 2018 22:40:27 +0000 (18:40 -0400)] 
Merge branch 'ticket25933'

7 years agoFix a test assertion failure due to uninitialized mainloop events
Nick Mathewson [Thu, 26 Apr 2018 18:38:43 +0000 (14:38 -0400)] 
Fix a test assertion failure due to uninitialized mainloop events

Bug not in any released Tor.

7 years agotest: Add missing geoip_dummy file to EXTRA_DIST
David Goulet [Thu, 26 Apr 2018 18:15:24 +0000 (14:15 -0400)] 
test: Add missing geoip_dummy file to EXTRA_DIST

Needed to run tests from the tarball else the geoip unit test would fail by
not finding that file.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge branch 'ticket25931'
Nick Mathewson [Thu, 26 Apr 2018 17:52:16 +0000 (13:52 -0400)] 
Merge branch 'ticket25931'

7 years agoRemove connection_ap_attach_pending() from per-second callback.
Nick Mathewson [Thu, 26 Apr 2018 17:37:13 +0000 (13:37 -0400)] 
Remove connection_ap_attach_pending() from per-second callback.

In 25374, we created the necessary post-loop event for scheduling
connection_ap_attach_pending as needed.  Before that, we were
already running this event once per mainloop.  There's no reason to
also run it once per second.

Closes ticket 25933.  No changes file, since the relevant change is
already in 25374.  Or possibly in 17590, depending on how you look
at it.

7 years agoMove close-and-cleanup functions to a postloop event.
Nick Mathewson [Thu, 26 Apr 2018 17:15:38 +0000 (13:15 -0400)] 
Move close-and-cleanup functions to a postloop event.

Implements ticket 25932.

7 years agoMove consdiffmgr_rescan() into a mainloop event.
Nick Mathewson [Thu, 26 Apr 2018 16:20:01 +0000 (12:20 -0400)] 
Move consdiffmgr_rescan() into a mainloop event.

The change here was very simple, since there is a flag set whenever
we want to schedule this event.

Closes ticket 25391.
m

7 years agoMerge remote-tracking branch 'dgoulet/ticket25515_034_01-squashed'
David Goulet [Thu, 26 Apr 2018 15:38:15 +0000 (11:38 -0400)] 
Merge remote-tracking branch 'dgoulet/ticket25515_034_01-squashed'

7 years agoRecover newline at the EOF, removed by mistake
juga0 [Tue, 24 Apr 2018 11:27:11 +0000 (11:27 +0000)] 
Recover newline at the EOF, removed by mistake

in 071236e3e252fd0dcf5102739adecb8e69a76c4c.

7 years agotests: Add forgotten empty file required for geoip
juga0 [Wed, 18 Apr 2018 08:51:39 +0000 (08:51 +0000)] 
tests: Add forgotten empty file required for geoip

7 years agoAdd clarification about type of file expected
juga0 [Tue, 17 Apr 2018 16:53:18 +0000 (16:53 +0000)] 
Add clarification about type of file expected

7 years agoRemove FIXME about comparing num countries,
juga0 [Tue, 17 Apr 2018 16:38:24 +0000 (16:38 +0000)] 
Remove FIXME about comparing num countries,

* remove the fixme since clearing the countries should be other issue
* remove unused variables related to it since that cause travis to fail

7 years agotests: Fix a couple typos and remove unnecessary inline comments.
Isis Lovecruft [Mon, 16 Apr 2018 19:28:03 +0000 (19:28 +0000)] 
tests: Fix a couple typos and remove unnecessary inline comments.

7 years agotests: Skip two more geoip_load_file tests on Windows.
Isis Lovecruft [Mon, 16 Apr 2018 19:06:56 +0000 (19:06 +0000)] 
tests: Skip two more geoip_load_file tests on Windows.

 * FIXES part of #25515: https://bugs.torproject.org/25515

7 years agoRemove a blank line that was bothering me.
Nick Mathewson [Thu, 26 Apr 2018 13:10:58 +0000 (09:10 -0400)] 
Remove a blank line that was bothering me.

7 years agoIgnore CircuitPriorityHalflife values under -EPSILON.
Nick Mathewson [Wed, 25 Apr 2018 13:15:47 +0000 (09:15 -0400)] 
Ignore CircuitPriorityHalflife values under -EPSILON.

Previously, we were ignoring values _over_ EPSILON.  This bug was
also causing a warning at startup because the default value is set
to -1.0.

Fixes bug 25577; bugfix on 6b1dba214db.  Bug not in any released tor.

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Wed, 25 Apr 2018 12:01:54 +0000 (08:01 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Wed, 25 Apr 2018 12:01:54 +0000 (08:01 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Wed, 25 Apr 2018 12:01:53 +0000 (08:01 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoFix a copy-paste error in the fix for #23693.
Nick Mathewson [Wed, 25 Apr 2018 12:00:55 +0000 (08:00 -0400)] 
Fix a copy-paste error in the fix for #23693.

Found by coverity; CID 25912; bug not in any released Tor.

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Tue, 24 Apr 2018 14:38:37 +0000 (10:38 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 14:38:37 +0000 (10:38 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 24 Apr 2018 14:38:37 +0000 (10:38 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Tue, 24 Apr 2018 14:38:37 +0000 (10:38 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'travis_distcheck_033' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 14:38:34 +0000 (10:38 -0400)] 
Merge branch 'travis_distcheck_033' into maint-0.3.3

7 years agoMerge branch 'travis_distcheck_029' into maint-0.2.9
Nick Mathewson [Tue, 24 Apr 2018 14:38:19 +0000 (10:38 -0400)] 
Merge branch 'travis_distcheck_029' into maint-0.2.9

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Tue, 24 Apr 2018 14:37:36 +0000 (10:37 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 14:37:36 +0000 (10:37 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge remote-tracking branch 'dgoulet/bug25901_032_01' into maint-0.3.2
Nick Mathewson [Tue, 24 Apr 2018 14:36:17 +0000 (10:36 -0400)] 
Merge remote-tracking branch 'dgoulet/bug25901_032_01' into maint-0.3.2

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Tue, 24 Apr 2018 12:51:58 +0000 (08:51 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Tue, 24 Apr 2018 12:51:55 +0000 (08:51 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Tue, 24 Apr 2018 12:49:24 +0000 (08:49 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge remote-tracking branch 'public/bug23693_031_redux' into maint-0.3.1
Nick Mathewson [Tue, 24 Apr 2018 12:49:20 +0000 (08:49 -0400)] 
Merge remote-tracking branch 'public/bug23693_031_redux' into maint-0.3.1

7 years agohs: Fix memleak in v3 on SIGHUP
David Goulet [Mon, 23 Apr 2018 15:09:57 +0000 (11:09 -0400)] 
hs: Fix memleak in v3 on SIGHUP

Fixes #25901

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge remote-tracking branch 'dgoulet/ticket25762_034_05'
Nick Mathewson [Mon, 23 Apr 2018 15:02:05 +0000 (11:02 -0400)] 
Merge remote-tracking branch 'dgoulet/ticket25762_034_05'

7 years agotest: Add periodic events unit tests
David Goulet [Wed, 18 Apr 2018 18:50:07 +0000 (14:50 -0400)] 
test: Add periodic events unit tests

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomain: Update periodic events comment based on latest code
David Goulet [Wed, 18 Apr 2018 14:25:39 +0000 (10:25 -0400)] 
main: Update periodic events comment based on latest code

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomain: Use rescan_periodic_events in initialize_periodic_events_cb
Nick Mathewson [Tue, 17 Apr 2018 22:55:28 +0000 (18:55 -0400)] 
main: Use rescan_periodic_events in initialize_periodic_events_cb

7 years agoperiodic: Add an enable and disable function
David Goulet [Tue, 17 Apr 2018 13:57:09 +0000 (09:57 -0400)] 
periodic: Add an enable and disable function

Two helper functions to enable an event and disable an event which wraps the
launch and destroy of an event but takes care of the enabled flag.

They are also idempotent that is can be called multiple time on the same event
without effect if the event was already enabled or disabled.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoconfig: Set up periodic events when options changes
David Goulet [Tue, 17 Apr 2018 13:44:01 +0000 (09:44 -0400)] 
config: Set up periodic events when options changes

In case we transitionned to a new role in Tor, we need to launch and/or
destroy some periodic events.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomain: Launch periodic events by roles
David Goulet [Tue, 17 Apr 2018 13:31:50 +0000 (09:31 -0400)] 
main: Launch periodic events by roles

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomain: Specialize the periodic events on a per-role basis
David Goulet [Mon, 16 Apr 2018 19:50:50 +0000 (15:50 -0400)] 
main: Specialize the periodic events on a per-role basis

In tor, we have a series of possible "roles" that the tor daemon can be
enabled for. They are:

  Client, Bridge, Relay, Authority (directory or bridge) and Onion service.

They can be combined sometimes. For instance, a Directory Authority is also a
Relay. This adds a "roles" field to a periodic event item object which is used
to know for which roles the event is for.

The next step is to enable the event only if the roles apply. No behavior
change at this commit.

Pars of #25762

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomain: Sort alphabetically periodic event callbacks
David Goulet [Mon, 16 Apr 2018 19:26:49 +0000 (15:26 -0400)] 
main: Sort alphabetically periodic event callbacks

No behavior change, just to make it easier to find callbacks and for the sake
of our human brain to parse the list properly.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agoMerge remote-tracking branch 'github/lazy_bucket_refill'
Nick Mathewson [Mon, 23 Apr 2018 13:47:05 +0000 (09:47 -0400)] 
Merge remote-tracking branch 'github/lazy_bucket_refill'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Mon, 23 Apr 2018 13:24:33 +0000 (09:24 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Mon, 23 Apr 2018 13:24:33 +0000 (09:24 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoMerge branch 'maint-0.3.1' into maint-0.3.2
Nick Mathewson [Mon, 23 Apr 2018 13:23:31 +0000 (09:23 -0400)] 
Merge branch 'maint-0.3.1' into maint-0.3.2

7 years agoMerge branch 'maint-0.2.9' into maint-0.3.1
Nick Mathewson [Mon, 23 Apr 2018 13:23:31 +0000 (09:23 -0400)] 
Merge branch 'maint-0.2.9' into maint-0.3.1

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Mon, 23 Apr 2018 13:23:31 +0000 (09:23 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoMerge branch 'maint-0.3.2' into maint-0.3.3
Nick Mathewson [Mon, 23 Apr 2018 13:23:31 +0000 (09:23 -0400)] 
Merge branch 'maint-0.3.2' into maint-0.3.3

7 years agoMerge branch 'bug24969_029_v2' into maint-0.2.9
Nick Mathewson [Mon, 23 Apr 2018 13:23:25 +0000 (09:23 -0400)] 
Merge branch 'bug24969_029_v2' into maint-0.2.9

7 years agoPermit the nanosleep system call in the seccomp2 callbox
Nick Mathewson [Wed, 18 Apr 2018 14:25:42 +0000 (10:25 -0400)] 
Permit the nanosleep system call in the seccomp2 callbox

Fixes bug 24969; bugfix on 0.2.5.1-alpha when the sandbox was introduced.

7 years agoMerge remote-tracking branch 'neel/b25511-r4'
Nick Mathewson [Mon, 23 Apr 2018 13:13:24 +0000 (09:13 -0400)] 
Merge remote-tracking branch 'neel/b25511-r4'

7 years agoDocument default for ControlSocket.
Nick Mathewson [Mon, 23 Apr 2018 11:47:01 +0000 (07:47 -0400)] 
Document default for ControlSocket.

Closes 25897.

7 years agoMerge branch 'ticket25024_squashed'
Nick Mathewson [Mon, 23 Apr 2018 00:53:04 +0000 (20:53 -0400)] 
Merge branch 'ticket25024_squashed'

7 years agoTweak changes file for 25024 to mention "check-typos"
Nick Mathewson [Mon, 23 Apr 2018 00:52:55 +0000 (20:52 -0400)] 
Tweak changes file for 25024 to mention "check-typos"

7 years agoadd changes file and update check-typos in makefile
Deepesh Pathak [Sat, 14 Apr 2018 19:35:49 +0000 (01:05 +0530)] 
add changes file and update check-typos in makefile

7 years agoAdd spell check to makefile to check for typos ticket#25024
Deepesh Pathak [Mon, 29 Jan 2018 22:03:01 +0000 (03:33 +0530)] 
Add spell check to makefile to check for typos ticket#25024

- Use misspell to check for typos in codebase
- Add `make check-typos` to run the checks
- Add `check-typos` to `make check`

7 years agoMerge remote-tracking branch 'mikeperry/bug25400_squashed'
Nick Mathewson [Mon, 23 Apr 2018 00:39:35 +0000 (20:39 -0400)] 
Merge remote-tracking branch 'mikeperry/bug25400_squashed'

7 years agoMerge branch 'remove_old_consensus_methods_2018_squashed'
Nick Mathewson [Mon, 23 Apr 2018 00:01:09 +0000 (20:01 -0400)] 
Merge branch 'remove_old_consensus_methods_2018_squashed'

7 years agoAdd a changes file for removing old consensus methods
Nick Mathewson [Mon, 9 Apr 2018 19:13:37 +0000 (15:13 -0400)] 
Add a changes file for removing old consensus methods

(Ticket 24378; proposal 290.)

7 years agoRequire MIN_METHOD_FOR_RECOMMENDED_PROTOCOLS
Nick Mathewson [Mon, 9 Apr 2018 19:10:27 +0000 (15:10 -0400)] 
Require MIN_METHOD_FOR_RECOMMENDED_PROTOCOLS

(Remove support for running without this method.)

7 years agoRemove MIN_METHOD_FOR_{SHARED_RANDOM,EXCLUDING_INVALID_NODES}
Nick Mathewson [Mon, 9 Apr 2018 19:07:51 +0000 (15:07 -0400)] 
Remove MIN_METHOD_FOR_{SHARED_RANDOM,EXCLUDING_INVALID_NODES}

Also remove client detection for pre-EXCLUDING_INVALID_NODES
consensuses, and a test for that detection.

7 years agoRemove MIN_METHOD_FOR_ED25519_ID_VOTING
Nick Mathewson [Mon, 9 Apr 2018 19:02:57 +0000 (15:02 -0400)] 
Remove MIN_METHOD_FOR_ED25519_ID_VOTING

This also lets us remove the old rsa-based routerstatus collator.

7 years agoRemove MIN_METHOD_FOR_{PACKAGE_LINES,GUARDFRACTION,ED25519_ID_IN_MD}
Nick Mathewson [Mon, 9 Apr 2018 18:59:34 +0000 (14:59 -0400)] 
Remove MIN_METHOD_FOR_{PACKAGE_LINES,GUARDFRACTION,ED25519_ID_IN_MD}

Also remove a rest for pre-19 microdesc versions.

7 years agoRemove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it.
Nick Mathewson [Mon, 9 Apr 2018 18:54:46 +0000 (14:54 -0400)] 
Remove MIN_METHOD_FOR_ID_HASH_IN_MD and a test for running without it.

7 years agoRemove MIN_METHOD_{FOR_P6_LINES,FOR_NTOR_KEY,TO_CLIP_UNMEASURED_BW}
Nick Mathewson [Mon, 9 Apr 2018 18:51:36 +0000 (14:51 -0400)] 
Remove MIN_METHOD_{FOR_P6_LINES,FOR_NTOR_KEY,TO_CLIP_UNMEASURED_BW}

Also remove a unit test for pre-MIN_METHOD_FOR_NTOR_KEY consensuses.

7 years agoRemove MIN_METHOD_FOR and MIN_METHOD_FOR_A_LINES
Nick Mathewson [Mon, 9 Apr 2018 18:44:03 +0000 (14:44 -0400)] 
Remove MIN_METHOD_FOR and MIN_METHOD_FOR_A_LINES

Also, in networkstatus.c, remove client code for recognizing pre-
MIN_METHOD_FOR_A_LINES consensuses, and corresponding unit tests in
test_dir.c.

7 years agoDisable consensus methods before 25.
Nick Mathewson [Mon, 9 Apr 2018 18:31:51 +0000 (14:31 -0400)] 
Disable consensus methods before 25.

Consensus method 25 is the oldest one supported by any stable
version of 0.2.9, which is our current most-recent LTS.  Thus, by
proposal 290, they should be removed.

This commit does not actually remove the code to implement these
methods: it only makes it so authorities will no longer support
them.  I'll remove the backend code for them in later commits.

7 years agoMerge branch 'bug25691_033_again_squashed'
Nick Mathewson [Sun, 22 Apr 2018 23:44:27 +0000 (19:44 -0400)] 
Merge branch 'bug25691_033_again_squashed'

7 years agocontrol EXTENDCIRCUIT: check node_has_preferred_descriptor().
Nick Mathewson [Sun, 22 Apr 2018 16:27:21 +0000 (12:27 -0400)] 
control EXTENDCIRCUIT: check node_has_preferred_descriptor().

Suggested by teor during code review for 25691.

7 years agoRepair the legacy_hs/pick_tor2web_rendezvous_node unit test
Nick Mathewson [Mon, 16 Apr 2018 15:52:57 +0000 (11:52 -0400)] 
Repair the legacy_hs/pick_tor2web_rendezvous_node unit test

It tried to pick nodes for which only routerinfo_t items are set,
but without setting UseMicroDescriptors to 0.  This won't work any
more, now that we're strict about using the right descriptor types
due to 25691/25692/25213.

7 years agoRename node_has_descriptor() to node_has_any_descriptor()
Nick Mathewson [Mon, 16 Apr 2018 15:51:02 +0000 (11:51 -0400)] 
Rename node_has_descriptor() to node_has_any_descriptor()

Changing the name of this function should help keep us from misusing
it when node_has_preferred_descriptor() would be more appropriate.

7 years agoAdd a changes file for 25691/25692
Nick Mathewson [Mon, 16 Apr 2018 15:47:59 +0000 (11:47 -0400)] 
Add a changes file for 25691/25692

7 years agoUse router_crn_flags in more places, to pass direct-connect flag
Nick Mathewson [Mon, 16 Apr 2018 15:41:45 +0000 (11:41 -0400)] 
Use router_crn_flags in more places, to pass direct-connect flag

In order to fix 25691 and 25692, we need to pass the "direct_conn"
flag to more places -- particularly when choosing single-hop
tunnels.  The right way to do this involves having a couple more
functions accept router_crn_flags_t, rather than a big list of
boolean arguments.

This commit also makes sure that choose_good_exit_server_general()
honors the direct_conn flag, to fix 25691 and 25692.

7 years agoUse node_has_preferred_descriptor() in another case
Nick Mathewson [Mon, 16 Apr 2018 15:40:14 +0000 (11:40 -0400)] 
Use node_has_preferred_descriptor() in another case

In router_add_running_nodes_to_smartlist(), we had an inline
implementation of the logic from node_has_descriptor(), which should
be changed to node_has_preferred_descriptor().

7 years agoCheck for "the right descriptor", not just "any descriptor".
Nick Mathewson [Mon, 16 Apr 2018 14:38:55 +0000 (10:38 -0400)] 
Check for "the right descriptor", not just "any descriptor".

This patch adds a new node_has_preferred_descriptor() function, and
replaces most users of node_has_descriptor() with it.  That's an
important change, since as of d1874b433953f64 (our fix for #25213),
we are willing to say that a node has _some_ descriptor, but not the
_right_ descriptor for a particular use case.

Part of a fix for 25691 and 25692.

7 years agoAllow cpuworkers to exist without onion keys
Nick Mathewson [Sun, 22 Apr 2018 21:12:18 +0000 (17:12 -0400)] 
Allow cpuworkers to exist without onion keys

Now that we allow cpuworkers for dirport-only hosts (to fix 23693),
we need to allow dup_onion_keys() to succeed for them.

The change to construct_ntor_key_map() is for correctness,
but is not strictly necessary.

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Fri, 20 Apr 2018 18:40:09 +0000 (14:40 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoFix documentation bug 25857: the universe is ::/0, not ::/128
Nick Mathewson [Fri, 20 Apr 2018 18:35:33 +0000 (14:35 -0400)] 
Fix documentation bug 25857: the universe is ::/0, not ::/128

Patch from CTassisF.

7 years agoMerge branch 'travis_distcheck_031' into travis_distcheck_033
Nick Mathewson [Wed, 18 Apr 2018 22:37:59 +0000 (18:37 -0400)] 
Merge branch 'travis_distcheck_031' into travis_distcheck_033

7 years agoTest the with-rust and without-rust distcheck variants
Nick Mathewson [Wed, 18 Apr 2018 21:36:35 +0000 (17:36 -0400)] 
Test the with-rust and without-rust distcheck variants

7 years agoMerge branch 'travis_distcheck_029' into travis_distcheck_033
Nick Mathewson [Wed, 18 Apr 2018 22:34:28 +0000 (18:34 -0400)] 
Merge branch 'travis_distcheck_029' into travis_distcheck_033