Commit Graph

34695 Commits

Author SHA1 Message Date
David Goulet ff93133403 Merge branch 'tor-github/pr/1675' 2020-01-20 10:47:49 -05:00
David Goulet ca8b90a843 Merge branch 'tor-github/pr/1668' 2020-01-20 10:44:03 -05:00
teor 51c76215db doc: Minor man page fixes
Fix a client port list that's missing HTTPTunnelPort.

Wrap a long line.
2020-01-20 16:41:07 +10:00
teor 6898131b41 doc: Improve port flags in man page
Explain that:
* most flags default to off
* flags that default to on are specified

Document PreferIPv6Automap in its "No" form, because it's on by
default.

Cleanup after 32637.
2020-01-20 16:38:02 +10:00
teor bf2a399fc0 config: Make clients tell dual-stack exits they prefer IPv6
Make Tor clients tell dual-stack exits that they prefer IPv6
connections.

This change is equivalent to setting the PreferIPv6 flag on
SOCKSPorts (and most other listener ports). Tor Browser has
been setting this flag for some time, and we want to remove a
client distinguisher at exits.

Also update the man page, putting all the IP flags in their
non-default forms.

Closes ticket 32637.
2020-01-20 16:36:58 +10:00
teor b23b8fa4a1 Merge remote-tracking branch 'tor-github/pr/1673' 2020-01-20 15:52:40 +10:00
teor af30be9515 test/nodelist: Remove ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD
When we removed obsolete consensus methods in 32695, we also
removed ROUTERSTATUS_FORMAT_NO_CONSENSUS_METHOD, so we need to
remove it from the routerstatus format tests.

Part of 20218.
2020-01-20 15:51:30 +10:00
teor 3851128e88 Merge branch 'ticket20218_rebased_squashed' into ticket20218_merged
* ticket 32695 removed networkstatus_consensus_has_ipv6(),
  keep that change in master.
* ticket 20218 modifies the function name and comment for
  routerstatus_has_visibly_changed(), keep that change
  in ticket20218_rebased_squashed.
2020-01-20 15:50:54 +10:00
Nick Mathewson 4541289f2a Rename test to match new identifier. 2020-01-20 15:48:52 +10:00
Nick Mathewson e2637214f2 split a wide line 2020-01-20 15:48:49 +10:00
Nick Mathewson 152cbf2a59 Rename routerstatus_has_changed to routerstatus_has_visibly_changed
This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        routerstatus_has_changed routerstatus_has_visibly_changed

It was generated with --no-verify, since it introduces a wide line.
I'll fix it in a subsequent commit.
2020-01-20 15:48:45 +10:00
Nick Mathewson c3633e6b29 Update routerstatus_has_changed tests.
Now they also check whether output of routerstatus_format_entry()
has changed.
2020-01-20 15:48:41 +10:00
Nick Mathewson 702a753cf3 Add unit test for routerstatus_has_changed() 2020-01-20 15:48:25 +10:00
teor 0b82b5ee42 Merge remote-tracking branch 'tor-github/pr/1671' 2020-01-20 15:40:42 +10:00
teor 6975277649 Merge remote-tracking branch 'tor-github/pr/1667' 2020-01-20 15:40:08 +10:00
teor 5ad1efa062 add_c_file: Fix "control line not preceded by a blank line"
Fix dirauth and relay module include.am add_c_file.py
"control line not preceded by a blank line" errors.

Also remove a duplicate ADD_C_FILE: SOURCES in the relay module.

Obviously correct fixes to already-reviewed code.
2020-01-20 13:27:46 +10:00
teor 28c8c63de9 add_c_file: Replace asserts with exceptions
Closes 32962.
2020-01-20 13:27:40 +10:00
teor 2c75d4a8d0 add_c_file: Improve script documentation
Part of 32962.
2020-01-20 13:20:14 +10:00
teor 0418bc0cb2 add_c_file: Improve tor source directory checks
Check that the script isn't in a tor build directory, by looking
for a src/include.am file.

Part of 32962.
2020-01-20 13:04:02 +10:00
Nick Mathewson 4f88eb849c Fix a small lint-changes warning. 2020-01-17 08:50:04 -05:00
Nick Mathewson 5086b16055 Merge remote-tracking branch 'tor-github/pr/1529' 2020-01-17 08:49:56 -05:00
Nick Mathewson c8b6392b4e Initialize publish/subscribe code when running as an NT service.
Fixes bug 32778; bugfix on 0.4.1.1-alpha.
2020-01-17 08:41:52 -05:00
Nick Mathewson eef021e12d Revert "Use tor_api.h entry points in ntmain.c."
This reverts commit dca2629480.
2020-01-17 08:39:56 -05:00
Nick Mathewson d7a22160f5 Revert "Restore feature where nt-services detect non-"run_tor" modes."
This reverts commit 5c240db0bf.
2020-01-17 08:39:49 -05:00
Nick Mathewson 7f03ba06d8 Merge branch 'ticket32806' 2020-01-17 08:37:33 -05:00
Nick Mathewson 6d2b9c9631 Remove some dead checks
The only code that could set these options to be negative was in the
unit tests.
2020-01-17 08:31:22 -05:00
Nick Mathewson 648e1afc33 fix a stray asterisk in a comment 2020-01-17 08:25:09 -05:00
Nick Mathewson abd9ae48ac Merge branch 'ticket32487_squashed_and_merged' 2020-01-17 07:50:50 -05:00
Nick Mathewson 01fdc3240f Merge branch 'ticket32695_squashed' 2020-01-16 16:42:01 -05:00
Nick Mathewson ceacda44f1 Remove functions that checked for pre-ipv6 consensus.
We no longer need or need to test:
  * node_awaiting_ipv6()
  * networkstatus_consensus_has_ipv6().
2020-01-16 16:41:53 -05:00
Nick Mathewson 8d94bcbf8c Remove routerstatus_format_entry() consensus_method argument as unused 2020-01-16 16:41:53 -05:00
Nick Mathewson 441a048a3a Remove support for now-obsolete consensus methods before 28.
Closes ticket 32695.
2020-01-16 16:41:53 -05:00
Nick Mathewson 60a0d7d1e8 expose routerstatus_has_changed to unit tests. 2020-01-16 12:14:12 -05:00
Victor Nepveu 594e5ce635 Refactor routerstatus_has_changed function
- Check all fields that might change in a routerstatus
- Document the refactoring

Signed-off-by: Victor Nepveu <victor.nepveu@imt-atlantique.net>
2020-01-16 10:39:15 -05:00
Nick Mathewson 17c63ff9f6 Merge remote-tracking branch 'tor-github/pr/1663' 2020-01-16 10:24:39 -05:00
Nick Mathewson 3c89622e39 Merge branch 'ticket32487_squashed' into ticket32487_squashed_and_merged
Resolved conflicts in src/core/include.am
2020-01-16 07:57:37 -05:00
Nick Mathewson efb301c86c Document why dircache is not included in --list-modules 2020-01-16 07:48:17 -05:00
Nick Mathewson a623a49777 Add have_module_dircache(). 2020-01-16 07:48:17 -05:00
Nick Mathewson 5cff1ce84b Turn several functions from stubs into macros
This may help the compiler eliminate deadcode.
2020-01-16 07:48:17 -05:00
Nick Mathewson 6ba4b5e5da Rename dirclient_modes.h identifiers to start with dirclient_
This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        directory_must_use_begindir dirclient_must_use_begindir \
        directory_fetches_from_authorities dirclient_fetches_from_authorities \
        directory_fetches_dir_info_early dirclient_fetches_dir_info_early \
        directory_fetches_dir_info_later dirclient_fetches_dir_info_later \
        directory_too_idle_to_fetch_descriptors dirclient_too_idle_to_fetch_descriptors
2020-01-16 07:48:17 -05:00
Nick Mathewson 8d1f31190e Move directory_must_use_begindir() to dirclient_modes.[ch] 2020-01-16 07:48:17 -05:00
Nick Mathewson 773bcf5629 Move dirclient-related functions out of dirserv, and reenable them
I had incorrectly identified these functions as dircache-only, when
in fact they apply to everyone who acts a directory client.
2020-01-16 07:48:17 -05:00
Nick Mathewson a1bc471dd4 Add a changes file for disabling the dircache code. 2020-01-16 07:48:17 -05:00
Nick Mathewson 8a0c739467 Disable feature/dircache files when dircache module is disabled.
To make Tor still work, we define a minimal dircache_stub.c file
that defines the entry points to the module that can actually be
seen by the compiler when we're building with dircache and relay
disabled.
2020-01-16 07:48:17 -05:00
Nick Mathewson 6e12a8f047 Use dir_conn_clear_spool() in connection.c.
This is cleaner than iterating over the spool.
2020-01-16 07:48:17 -05:00
Nick Mathewson fe8156dbc2 Move dirserv_get_routerdescs() to control_getinfo.c
This function had some XXX comments indicating (correctly) that it
was not actually used by the dirserver code, and that only the
controller still used it.
2020-01-16 07:48:17 -05:00
Nick Mathewson 4cf15ee015 Move dir_split_resource_into_spoolable() to dircache module.
Only directory caches actually need to spool things.
2020-01-16 07:48:17 -05:00
Nick Mathewson 888a0be0b9 Define a "dircache" module.
For now, this module is enabled whenever the relay module is
enabled, and disabled whenever the relay module is disabled.  Though
they are logically separate, the use cases for running one without
the other are rare enough that we don't really want to support
compiling them independently.
2020-01-16 07:48:17 -05:00
teor 4025cbada6 Merge branch 'maint-0.4.2' 2020-01-16 10:00:55 +10:00
teor 48187248d3 Merge branch 'maint-0.4.1' into maint-0.4.2 2020-01-16 10:00:47 +10:00