Commit Graph

34909 Commits

Author SHA1 Message Date
Nick Mathewson 5149c100ed run "make autostyle" 2020-02-20 08:33:40 -05:00
Nick Mathewson b9cc4cc50a Merge branch 'ticket4631_squashed' 2020-02-20 08:17:47 -05:00
teor bed3b292ad dirvote: Improve the posted vote log message
Cleanup after 4631.
2020-02-20 08:17:37 -05:00
Roger Dingledine 98bf7604a3 fix typo from 7920fc35 2020-02-19 14:53:36 -05:00
Nick Mathewson a65efa7e83 Merge branch 'extract_relay_dns' 2020-02-19 13:58:53 -05:00
Nick Mathewson 65b75ef3d5 Merge branch 'extract_ext_orport' 2020-02-19 13:55:18 -05:00
Nick Mathewson defd941fe7 Make dns_cancel_pending_resolve() STATIC.
It is not called by anything outside of the tests and dns.c.
2020-02-19 12:30:09 -05:00
Nick Mathewson f739aa7962 Remove assert_all_pending_dns_resolves_ok().
It hasn't been used since 2009.
2020-02-19 12:27:49 -05:00
Nick Mathewson 51b470dbc8 dns.h: label functions that are only used inside feature/relay 2020-02-19 12:17:13 -05:00
Nick Mathewson 9b21a5d254 Note module-local functions in ext_orport.h
Since these are only used inside the feature/relay module, they
don't need stubs.
2020-02-19 12:12:00 -05:00
Nick Mathewson df6191f620 Make connection_or_get_by_ext_or_id() testing-only
Apparently it is only used by the unit tests: tor doesn't want it at
all.

I've opened a new ticket (33383) to we if we should remove this
whole feature.
2020-02-19 12:11:23 -05:00
Nick Mathewson 7b6e81f8e6 Merge branch 'extract_selftest' 2020-02-19 11:58:17 -05:00
Nick Mathewson 11d0016ca1 Merge remote-tracking branch 'tor-github/pr/1756/head' 2020-02-19 11:57:27 -05:00
Nick Mathewson dca2c00aca Merge remote-tracking branch 'tor-github/pr/1755/head' 2020-02-19 11:39:05 -05:00
teor 15192f88c0 dirvote: Remove an incorrect log message
Cleanup after 4631.
2020-02-19 11:09:21 +10:00
teor 4dd594d33c Merge remote-tracking branch 'tor-github/pr/1744' 2020-02-19 10:09:29 +10:00
teor 6e76570ede Makefile: Tweak the test-network* chuttney networks
In "make test-network", add tests for single onion services v2 and v3.

In "make test-network-all", test onion services v2 and v3 in the same
network.

Part of 33334.
2020-02-19 09:29:02 +10:00
teor d8cbb2965e Run "practracker --regen-overbroad"
Closes ticket 33373.
2020-02-19 08:13:02 +10:00
Taylor Yu 5164709f90 changes file for ticket 33275 2020-02-18 13:34:46 -06:00
Taylor Yu a46e585d6d manpage: Add a missing out-of-order comment 2020-02-18 13:28:57 -06:00
David Goulet f0561861e3 Merge branch 'tor-github/pr/1746' 2020-02-18 13:57:03 -05:00
Steven Engler 9a68eca3a7 Small changes to scheduler comments and state changes
Tries to make some of the comments in scheduler.c easier to follow,
and simplifies a couple of the scheduler channel state changes.
2020-02-18 13:56:58 -05:00
Nick Mathewson e85f46b7be Do not build selftest.c when running relay mode is disabled. 2020-02-18 13:31:33 -05:00
Nick Mathewson a1a3a4d585 Make ext_orport.c relay-mode-only. 2020-02-18 13:23:50 -05:00
Nick Mathewson 1f958b6020 Move ext_orport identifier map into ext_orport.c
There's no need to move the declarations: those were already in
ext_orport.h.

This shrinks connection_or.c a little.
2020-02-18 13:10:57 -05:00
Nick Mathewson 8ce15933e5 Move some declarations into proto_ext_or.h
They are for functions declared in that file.
2020-02-18 13:07:33 -05:00
Nick Mathewson eb07166eb8 Make sure callers can handle NULL ext-or auth cookie filename 2020-02-18 12:55:57 -05:00
Nick Mathewson c43a245292 Disable dns.c when relay mode is disabled.
This saves about 1% for me on a binary compiled without relay mode.

Closes ticket 33366.
2020-02-18 12:46:10 -05:00
Nick Mathewson 1f06f494c8 Move DNS TTL manipulation code to src/core/or
This removes a dependency from the client code on feature/relay.
2020-02-18 12:08:29 -05:00
Nick Mathewson dcbc45e6b2 Replace identifiers related to clipping DNS ttls.
This is an automated commit, generated by this command:

./scripts/maint/rename_c_identifier.py \
        MIN_DNS_TTL_AT_EXIT MIN_DNS_TTL \
        MAX_DNS_TTL_AT_EXIT MAX_DNS_TTL \
        dns_clip_ttl clip_dns_ttl
2020-02-18 12:00:24 -05:00
David Goulet 17724a7cde Merge branch 'tor-github/pr/1743' 2020-02-18 09:06:13 -05:00
Nick Mathewson d3c23b079a lintChanges: Tolerate variants that sortChanges knows how to clean up. 2020-02-18 09:01:56 -05:00
David Goulet f24959df1d Merge branch 'tor-github/pr/1740' 2020-02-18 08:46:52 -05:00
teor f298706326 dirauth: Update disabled dirvote_add_vote()
Update the function that handles directory authority votes when the
dirauth module is disabled.

Part of 4631.
2020-02-18 13:23:33 +10:00
teor e540a4147f changes: file for 4631 2020-02-18 13:23:30 +10:00
teor 8b5b574a81 dirauth: Refactor dirvote_add_vote()
Refactor dirvote_add_vote() by splitting some code out into static
functions.

Cleanup after 4631.
2020-02-18 13:23:27 +10:00
teor 56f715d300 test/dir: Add specific tests for late vote rejection
Part of 4631.
2020-02-18 13:23:23 +10:00
teor 2b7eec7590 test/dir: Update the tests for late vote rejection
Part of 4631.
2020-02-18 12:44:50 +10:00
Roger Dingledine acb5b0d535 Don't accept posted votes after :52:30
If we receive via 'post' a vote from a dir auth after the
fetch_missing_votes cutoff, that means we didn't get it by the time we
begin the "fetching missing votes from everybody else" phase, which means
it is very likely to cause a consensus split if we count it. Instead,
we reject it.

But we still allow votes that we fetch ourselves after that cutoff.

This is a demo branch for making progress on #4631.

I've been running it on moria1 and it catches and handles real buggy
behavior from directory authorities, e.g.

Jan 28 15:59:50.804 [warn] Rejecting vote from 199.58.81.140 received at 2020-01-28 20:59:50; our cutoff for received votes is 2020-01-28 20:52:30
Jan 28 15:59:50.805 [warn] Rejected vote from 199.58.81.140 ("Vote received too late, would be dangerous to count it").
Jan 29 01:52:52.667 [warn] Rejecting vote from 204.13.164.118 received at 2020-01-29 06:52:52; our cutoff for received votes is 2020-01-29 06:52:30
Jan 29 01:52:52.669 [warn] Rejected vote from 204.13.164.118 ("Vote received too late, would be dangerous to count it").
Jan 29 04:53:26.323 [warn] Rejecting vote from 204.13.164.118 received at 2020-01-29 09:53:26; our cutoff for received votes is 2020-01-29 09:52:30
Jan 29 04:53:26.326 [warn] Rejected vote from 204.13.164.118 ("Vote received too late, would be dangerous to count it").
2020-02-18 12:44:41 +10:00
swati fa48b0363e Revised and incorportaed comments from #33275 2020-02-17 22:47:06 +05:30
teor aebae8225b Makefile: Silence some submake logs in test-network
These logs split up the chutney SKIP, PASS, and FAIL messages,
and they don't actually contain any useful information.

Cleanup after 33334.
2020-02-17 22:03:09 +10:00
teor da280a4309 Makefile: Add an IPv6 mixed chutney network
This network is used in make test-network-all and test-network-ipv6.

Closes 33334.
2020-02-17 14:55:05 +10:00
teor 85eb170923 Makefile: Add v3 onion services to the mixed network
This network is used in make test-network-all and test-network-ipv4.

Part of 33334.
2020-02-17 14:54:24 +10:00
teor 2151822bd0 Makefile: Refactor and tweak test-network
The refactor is simpler, and supports IPv6 mixed networks.

The refactor also slightly changes the order of the IPv6 and mixed
checks. But it's closer to the original order before 33280.

And if all the network lists that need a network type are empty,
we don't check if we can run that network type. (And if a network
list is empty, we don't say we're going to run an empty list.)

Part of 33334.
2020-02-17 14:47:40 +10:00
teor f231827946 Merge remote-tracking branch 'tor-github/pr/1731' 2020-02-17 13:49:23 +10:00
teor 8874d1c247 Makefile: Hide some recursive make logs
These logs break up the chutney test output.

Part of 33280.
2020-02-17 13:47:50 +10:00
teor 225613fcc2 Makefile: Quote test-network variable expansions
Also:
  * wrap some long lines
  * replace an instance of "test ... -a ..." with "test ... && test ..."

Part of 33280.
2020-02-17 13:47:34 +10:00
teor eaeda21da1 Travis: Make Chutney output more readable
* Use a shorter name for the chutney make target
* Put the chutney make target first, when using a custom target

Part of 33280.
2020-02-17 13:47:22 +10:00
teor 334469cc39 Merge branch 'bug33195_master' into ticket33280_master
Conflicts:
* Keep the changes from ticket33280_master
2020-02-17 13:46:09 +10:00
Panagiotis Vasilopoulos 674a821fbb Stop assuming that /usr/bin/python exists
Fixes 33192
2020-02-16 21:58:01 +02:00