teor
f9fef2633f
relay: Set some output arguments in stubs
...
Fixes part of bug 33674; not in any released version of tor.
2020-03-21 02:48:40 +10:00
Nick Mathewson
3e24bd5557
Merge branch 'maint-0.4.3'
2020-03-20 07:56:42 -04:00
teor
d4a74021e5
relay/dirauth: Set some output arguments in stubs
...
And document how some functions set their output arguments.
Fixes bug 33674; bugfix on 0.4.3.1-alpha.
2020-03-20 07:56:26 -04:00
Nick Mathewson
c478dc9b2f
Set *have_low_ports_out from stub port_parse_ports_relay().
...
Previously we just ignored this option, which would leave it unset,
and cause an assertion failure later on when running with the User
option.
Fixes bug 33668; bugfix on 0.4.3.1-alpha.
2020-03-20 07:56:26 -04:00
teor
81687f5bc9
relay: Split out relay-only circuit building
...
Move the relay-only circuit building functions into a new file.
Part of 33633.
2020-03-20 18:05:10 +10:00
teor
fdba6ff0c0
relay: Move inform_testing_rechability() to relay
...
Move inform_testing_rechability() to the relay module, and disable it
when the relay module is disabled.
Part of 33633.
2020-03-20 18:05:10 +10:00
teor
07280c567e
relay: Re-order selftest header
...
The selftest header declares functions, and stubs for when the relay
module is disabled. Put the functions and stubs in the same order.
Part of 33633.
2020-03-20 18:05:10 +10:00
Nick Mathewson
9ca7900e17
Merge branch 'maint-0.4.3'
2020-03-12 12:46:12 -04:00
Nick Mathewson
e03bb35f90
Merge branch 'ticket33361_035_01_squashed' into maint-0.4.3
...
Conflicts:
src/app/config/config.c
2020-03-12 12:45:56 -04:00
Nick Mathewson
8e5c75e896
Merge remote-tracking branch 'tor-github/pr/1772/head'
2020-03-05 09:09:16 -05:00
Nick Mathewson
686494f0f7
Merge branch 'clang_format_prep_3'
2020-03-05 08:23:32 -05:00
Neel Chauhan
2ef2fef711
Correct spacing in dns_launch_correctness_checks()
2020-02-26 15:48:45 -08:00
Nick Mathewson
66bbdadbbe
Merge branch 'extract_routerkeys_squashed'
2020-02-20 10:41:12 -05:00
Nick Mathewson
1d068625dd
Move relay_handshake.[ch] into src/feature/relay, and make it optional
2020-02-20 10:41:06 -05:00
Nick Mathewson
e425ffc637
Disable routerkeys.c with --disable-relay-mode.
2020-02-20 10:41:06 -05:00
Nick Mathewson
d559ca3d5a
Move router_reset_reachability() into correct header, add a stub
...
Without this, -O0 builds fail, which is a sign that LTO builds may
fail too.
2020-02-20 08:36:40 -05:00
Nick Mathewson
5149c100ed
run "make autostyle"
2020-02-20 08:33:40 -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
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
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
teor
ff52205362
Merge branch 'maint-0.4.1' into maint-0.4.2
2020-02-12 12:22:04 +10:00
teor
5298113da9
Merge branch 'maint-0.3.5' into maint-0.4.1
2020-02-12 12:21:57 +10:00
Alexander Færøy
b9c7c61ea5
Lowercase the BridgeDistribution value from torrc in descriptors.
...
This patch ensures that we always lowercase the BridgeDistribution from
torrc in descriptors before submitting it.
See: https://bugs.torproject.org/32753
2020-02-12 12:21:41 +10:00
Nick Mathewson
d9e211ab70
Use semicolons after HT_PROTOTYPE and HT_GENERATE.
2020-02-10 12:54:43 -05:00
Nick Mathewson
e9b663beaf
onion_queue.c: use TAILQ_HEAD less confusingly.
...
When we use macro inline, clang-format likes to break it in the
middle, which makes checkSpace get confused.
2020-02-06 14:33:05 -05:00
David Goulet
ca8b90a843
Merge branch 'tor-github/pr/1668'
2020-01-20 10:44:03 -05:00
Alexander Færøy
ca9a5390ff
Don't escape the bridge distribution value.
...
We already check if there are invalid values in
check_bridge_distribution_setting() and reject the value if that is the
case. We can therefore only have strings of [A-Z] | [a-z] | [0-9] | '-'
| '_' here which is according to the directory specification.
See: https://bugs.torproject.org/32753
2020-01-15 23:41:58 +00:00
teor
f3cbc26bdd
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-16 09:38:26 +10:00
Alexander Færøy
399ec3130b
Remove "hyphae" as a known value for BridgeDistribution.
...
This patch removes hyphae as a known value for the BridgeDistribution
option in torrc.
2020-01-15 23:20:27 +00:00
Alexander Færøy
1c8bafcdf9
Lowercase BridgeDistribution value before adding it to the descriptor.
...
This patch makes sure we lowercase the value of BridgeDistribution
before we add it to the descriptor as `bridge-distribution-request`.
See: https://bugs.torproject.org/32753
2020-01-15 17:22:47 +00:00
Alexander Færøy
026f0c7184
Make BridgeDistribution setting validator case-insensitive.
...
This patch makes sure that we accept values such as "nOne", "None", and
"AnY" as valid values for BridgeDistribution. We later ensure to
lower-case the values before they are forwarded to the BridgeDB.
See: https://bugs.torproject.org/32753
2020-01-15 17:21:10 +00:00
Alexander Færøy
3f20a69afb
Always escape BridgeDistribution value from torrc in descriptors.
...
When the BridgeDistribution value was added in commit
ebab521525
the check for whether the value
contains '\n' or '\r' was added as a requirement for whether or not the
value should be escaped.
This patch removes this check and makes sure we call `escaped()` on the
value every time before we add it to a descriptor.
See: https://bugs.torproject.org/32753
2020-01-15 17:18:30 +00:00
Nick Mathewson
73ac1add3f
Split core/include.am into per-subdirectory include.am files
...
Closes ticket 32137.
2020-01-13 09:34:17 -05:00
Nick Mathewson
93894fb770
Merge branch 'ticket22029_attempt_squashed'
2020-01-09 15:27:32 -05:00
Neel Chauhan
d0068be0dd
Allow ed25519 keys to be banned in approved-routers
2020-01-09 15:27:26 -05:00
Nick Mathewson
e45810113b
Merge branch 'pre_formatter_cleanups_squashed'
2020-01-09 07:32:39 -05:00
Nick Mathewson
2f7a2c42d2
Include ht.h in all headers that use HT_ENTRY()
...
Without this change, compilation success depends on include order in
several tricky ways.
2020-01-09 07:30:35 -05:00
Nick Mathewson
4f02812242
It's 2020. Update the copyright dates with "make update-copyright"
2020-01-08 18:39:17 -05:00
teor
a58cffe195
router: Improve port search function comments
2020-01-08 17:47:08 +10:00