Age | Commit message (Collapse) | Author |
|
|
|
This is unfortunately massive but both functionalities were extremely
intertwined and it would have required us to actually change the HSv2 code in
order to be able to split this into multiple commits.
After this commit, there are still artefacts of v2 in the code but there is no
more support for service, intro point and HSDir.
The v2 support for rendezvous circuit is still available since that code is
the same for the v3 and we will leave it in so if a client is able to
rendezvous on v2 then it can still transfer traffic. Once the entire network
has moved away from v2, we can remove v2 rendezvous point support.
Related to #40266
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Give more visibility to directory authority operators during the consensus
voting process.
Closes ticket 40245.
|
|
Typos found with codespell.
Please keep in mind that this should have impact on actual code
and must be carefully evaluated:
src/core/or/lttng_circuit.inc
- ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER)
+ ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
|
|
Shockingly, this test didn't break after this change!
|
|
These tests used a hardcoded vote with a hardcoded digest. That
vote didn't have any pr lines, and so it is now invalid. I've
adjusted the testing code so that it mocks the signature-checking,
so that we can more easily change the contents of the vote.
|
|
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
voting_schedule_recalculate_timing dirauth_sched_recalculate_timing \
voting_schedule_get_start_of_next_interval voting_sched_get_start_of_interval_after \
voting_schedule_get_next_valid_after_time dirauth_sched_get_next_valid_after_time
|
|
|
|
Cleanup after 4631.
|
|
Part of 4631.
|
|
Part of 4631.
|
|
|
|
This is an automatically generated commit, made with the following
kludgey perl script. It results in a number of wide lines, which
I'll clean up in a subsequent commit.
#/usr/bin/perl -w -i
$mod = "NS_MODULE";
$submod = "NS_SUBMODULE";
$last_was_empty = 0;
while (<>) {
s/\bASPECT\(\s*(\w+)\s*,\s*(\w+)\s*\)/$1_$2/;
if (/# *define +NS_MODULE +(\w+)/) {
$mod = $1;
next;
} elsif (/# *define +NS_SUBMODULE +(\w+)/) {
$submod = $1;
next;
}
next if (/#undef NS_(SUB)?MODULE/);
s/NS\(\s*test_main\s*\)/test_${mod}_${submod}/;
s/NS\(\s*(\w+)\s*\)/${mod}_${submod}_$1/g;
s/NS_FULL\(\\s*(\w+)\s*,\s*(\w+),\s*(\w+)\s*\)/$1_$2_$3/;
s/^(\s*)NS_MOCK\(\s*(\w+)\s*\)/$1MOCK($2,\n$1 ${mod}_${submod}_$2)/;
s/NS_UNMOCK\(\s*(\w+)\s*\)/UNMOCK($1)/;
s/TEST_CASE\(\s*(\w+)\s*\)/{ "$1", test_${mod}_$1, TT_FORK, NULL, NULL }/;
s/TEST_CASE_ASPECT\(\s*(\w+)\s*,\s*(\w+)\s*\)/{ "$1_$2", test_${mod}_$1_$2, TT_FORK, NULL, NULL }/;
s/NS_DECL\(\s*([^,]+)\s*,\s*([^,]+)\s*,\s*(\(.*)\);/static $1 ${mod}_${submod}_$2$3;\nATTR_UNUSED static int ${mod}_${submod}_$2_called = 0;/;
s/\bCALLED\(\s*(\w+)\s*\)/${mod}_${submod}_$1_called/;
if (/^$/) {
print if (! $last_was_empty);
$last_was_empty = 1;
} else {
$last_was_empty = 0;
print;
}
if (eof) {
$mod = "NS_MODULE";
$submod = "NS_SUBMODULE";
$last_was_empty = 0;
}
}
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date: Thu Jan 9 10:26:10 2020 -0500
#
# On branch disable_ns_macro
# Changes to be committed:
# modified: src/test/test_accounting.c
# modified: src/test/test_compat_libevent.c
# modified: src/test/test_dir.c
# modified: src/test/test_dir_handle_get.c
# modified: src/test/test_dns.c
# modified: src/test/test_options.c
# modified: src/test/test_procmon.c
# modified: src/test/test_rendcache.c
# modified: src/test/test_router.c
# modified: src/test/test_routerset.c
# modified: src/test/test_status.c
# modified: src/test/test_tortls.c
# modified: src/test/test_tortls_openssl.c
# modified: src/test/test_util_format.c
# modified: src/test/test_util_process.c
#
# Untracked files:
# experiments/
# locate_options.sh
# un_ns.pl
#
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Date: Thu Jan 9 10:26:10 2020 -0500
#
# On branch disable_ns_macro
# Changes to be committed:
# modified: src/test/test_accounting.c
# modified: src/test/test_compat_libevent.c
# modified: src/test/test_dir.c
# modified: src/test/test_dir_handle_get.c
# modified: src/test/test_dns.c
# modified: src/test/test_options.c
# modified: src/test/test_procmon.c
# modified: src/test/test_rendcache.c
# modified: src/test/test_router.c
# modified: src/test/test_routerset.c
# modified: src/test/test_status.c
# modified: src/test/test_tortls.c
# modified: src/test/test_tortls_openssl.c
# modified: src/test/test_util_format.c
# modified: src/test/test_util_process.c
#
# Untracked files:
# experiments/
# locate_options.sh
# un_ns.pl
#
|
|
This will help avoid wide lines in our output.
|
|
This is going to make my script happier; these lines will soon
disappear.
|
|
When these macros aren't defined, the expansions of the NS macros
can get particularly ugly.
|
|
|
|
We were actually omitting the semicolon in a few places, leading to
confusing indentation and some cocci failures.
|
|
This is an automated commit, generated by:
perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
|
|
|
|
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
get_dirportfrontpage relay_get_dirportfrontpage \
parse_port_config port_parse_config \
count_real_listeners port_count_real_listeners \
parse_transport_line pt_parse_transport_line \
ensure_bandwidth_cap config_ensure_bandwidth_cap \
get_effective_bwrate relay_get_effective_bwrate \
get_effective_bwburst relay_get_effective_bwburst \
warn_nonlocal_ext_orports port_warn_nonlocal_ext_orports \
parse_ports_relay port_parse_ports_relay \
update_port_set_relay port_update_port_set_relay \
get_transport_bindaddr_from_config pt_get_bindaddr_from_config \
get_options_for_server_transport pt_get_options_for_server_transport
It was generated with --no-verify, because it has some long lines.
Part of 32213.
|
|
This commit:
* moves relay config actions into relay_config,
* moves get_dirportfrontpage() into relay_config,
* adds thin wrappers to make the moved code compile.
No functional changes: the moved code is still enabled,
even if the relay module is disabled. (Some of the checks
are re-ordered, so the order of some warnings may change.)
Part of 32213.
|
|
The right way to free a config object is now to wrap config_free(),
always. Instead of creating an alternative free function, objects
should provide an alternative clear callback to free any fields that
the configuration manager doesn't manage.
This lets us simplify our code a little, and lets us extend the
confparse.c code to manage additional fields in config_free.
|
|
Previously we used time(NULL) to set the Expires: header in our HTTP
responses. This made the actual contents of that header untestable,
since the unit tests have no good way to override time(), or to see
what time() was at the exact moment of the call to time() in
dircache.c.
This gave us a race in dir_handle_get/status_vote_next_bandwidth,
where the time() call in dircache.c got one value, and the call in
the tests got another value.
I'm applying our regular solution here: using approx_time() so that
the value stays the same between the code and the test. Since
approx_time() is updated on every event callback, we shouldn't be
losing any accuracy here.
Fixes bug 30001. Bug introduced in fb4a40c32c4a7e5; not in any
released Tor.
|
|
|
|
|
|
|
|
|
|
When a directory authority is using a bandwidth file to obtain the
bandwidth values that will be included in the next vote, serve this
bandwidth file at /tor/status-vote/next/bandwidth.z.
|
|
|
|
|
|
|
|
(Thanks to cyberpunks for noting two of them!)
|
|
|
|
|
|
|
|
|
|
This commit just moves the code to two separate files. The geoip
code still has a few needless dependencies on core/* and features/*.
|
|
Parts of this C file naturally belong in dircache, dirclient, and
dircommon: so, move them there.
|
|
There are now separate modules for:
* the list of router descriptors
* the list of authorities and fallbacks
* managing authority certificates
* selecting random nodes
|
|
|
|
|
|
I am very glad to have written this script.
|
|
|
|
|
|
|
|
I was expecting this to be much worse.
|
|
|
|
|
|
|