]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
7 years agoInitialize ap in the fascist_firewall_choose_address_* family of functions to 0
Neel Chauhan [Tue, 10 Apr 2018 01:12:33 +0000 (21:12 -0400)] 
Initialize ap in the fascist_firewall_choose_address_* family of functions to 0

7 years agoMove stdbool include to torint.h
Nick Mathewson [Fri, 27 Apr 2018 19:08:27 +0000 (15:08 -0400)] 
Move stdbool include to torint.h

It's friday, and this seems like a good idea, and they're egging me
on in IRC.

7 years agoMerge branch 'maint-0.3.3'
Nick Mathewson [Fri, 27 Apr 2018 17:26:17 +0000 (13:26 -0400)] 
Merge branch 'maint-0.3.3'

7 years agoStop initialising rust submodules, travis does this for us
teor [Fri, 15 Dec 2017 01:55:02 +0000 (12:55 +1100)] 
Stop initialising rust submodules, travis does this for us

Fixes #24630.

7 years agoMerge branch 'bug25843_v2_squashed'
Nick Mathewson [Fri, 27 Apr 2018 16:45:07 +0000 (12:45 -0400)] 
Merge branch 'bug25843_v2_squashed'

7 years agoIntroduce torrc option NumPrimaryGuards
George Kadianakis [Wed, 25 Apr 2018 12:10:24 +0000 (15:10 +0300)] 
Introduce torrc option NumPrimaryGuards

7 years agotest: Unit test for the HS service event rescan
David Goulet [Fri, 27 Apr 2018 15:16:00 +0000 (11:16 -0400)] 
test: Unit test for the HS service event rescan

Because we rescan the main loop event list if the global map of services has
changed, this makes sure it does work.

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agohs: Rescan the main loop event list if the service map changes
David Goulet [Fri, 27 Apr 2018 15:14:12 +0000 (11:14 -0400)] 
hs: Rescan the main loop event list if the service map changes

Because ADD_ONION/DEL_ONION can modify the global service map (both for v2 and
v3), we need to rescan the event list so we either enable or disable the HS
service main loop event.

Fixees #25939

Signed-off-by: David Goulet <dgoulet@torproject.org>
7 years agomain: Don't rescan main loop events if not initialized
David Goulet [Fri, 27 Apr 2018 15:14:33 +0000 (11:14 -0400)] 
main: Don't rescan main loop events if not initialized

This is done because it makes our life easier with unit tests. Also, a rescan
on an uninitialized event list will result in a stacktrace.

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.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.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.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.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.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.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

7 years agoMerge branch 'travis_distcheck_029' into travis_distcheck_031
Nick Mathewson [Wed, 18 Apr 2018 21:35:41 +0000 (17:35 -0400)] 
Merge branch 'travis_distcheck_029' into travis_distcheck_031

7 years agoAdd distcheck support to travis configuration.
Nick Mathewson [Wed, 18 Apr 2018 18:24:54 +0000 (14:24 -0400)] 
Add distcheck support to travis configuration.

Implements 25814.

7 years agoRename some functions to start with a uniform prefix
Nick Mathewson [Wed, 18 Apr 2018 15:45:44 +0000 (11:45 -0400)] 
Rename some functions to start with a uniform prefix

7 years agoFix a pointer size error in test_bridges.c
Nick Mathewson [Tue, 17 Apr 2018 23:44:09 +0000 (19:44 -0400)] 
Fix a pointer size error in test_bridges.c

sizeof(ret) is the size of the pointer, not the size of what it
points to.  Fortunately, we already have a function to compare
tor_addr_port_t values for equality.

Bugfix on c2c5b13e5d8a77e; bug not in any released Tor. Found by
clang's scan-build.

7 years agoAdd an initialization case to node_get_prim_dirport
Nick Mathewson [Tue, 17 Apr 2018 23:41:51 +0000 (19:41 -0400)] 
Add an initialization case to node_get_prim_dirport

Fixes a bug found by scan-build; bugfix on c2fa743806acc. Bug not in
any released Tor.