teor
a3244c03fb
nodelist: Replace int with bool
...
Make some interfaces and implementations consistent by replacing int
with bool.
Part of 34200.
2020-05-18 21:53:52 +10:00
teor
3f7f976d48
nodelist: Stop recursing in router_choose_random_node()
...
Instead, call out to a helper function, repeating the call if needed.
Avoids duplicating exclusions for:
* the current relay's family, and
* any exclusions specified by the caller.
Part of 34200.
2020-05-18 21:53:52 +10:00
teor
2ea1692c20
nodelist: Rewrite router_crn_flags_t
...
Re-order the flags in a logical order, and re-number them.
Add missing comments, fix comment typos.
Part of 34200.
2020-05-18 21:53:52 +10:00
teor
48413dc65f
nodelist: Remove the unused CRN_WEIGHT_FOR_EXIT flag
...
Part of 34200.
2020-05-18 21:53:52 +10:00
teor
1ec604f0f9
nodelist: Move node flag checks
...
Move node flag checks to router_add_running_nodes_to_smartlist(), where
they are actually used.
Part of 34200.
2020-05-18 21:53:52 +10:00
teor
280195f414
nodelist: Move the v3 onion service rendezvous check
...
And delete a loop that is now empty. This change should improve tor's
performance, because we no longer iterate through the nodelist twice for
every node in every circuit path.
Part of 34200.
2020-05-18 21:53:52 +10:00
teor
ce11e3bf69
nodelist: Move the single-hop exit check
...
Check for single-hop exits in router_add_running_nodes_to_smartlist(),
rather than router_choose_random_node().
Part of 34200.
2020-05-18 21:53:52 +10:00
teor
4bcec38fce
test/protover: Add debug logs to some tests
...
Part of 33222.
2020-05-18 21:51:31 +10:00
teor
3efe53562f
rust/protover: Fix protocol version support error handling
...
Make Rust protocol version support checks consistent with the
undocumented error behaviour of the corresponding C code.
Fixes bug 34251; bugfix on 0.3.3.5-rc.
2020-05-18 21:50:35 +10:00
teor
f05c144d7c
rust: declare HSIntro=5
...
Declare support for the onion service introduction point denial of
service extensions, when building tor with Rust.
Fixes bug 34248; bugfix on 0.4.2.1-alpha.
2020-05-18 20:16:11 +10:00
Neel Chauhan
087b466fcf
Declare variables in for loops in rend_service_dump_stats()
2020-05-17 15:19:39 -07:00
teor
c6bcc92c17
test/protover: Add tests for summarize flags
...
Part of 33222.
2020-05-17 22:51:43 +10:00
Neel Chauhan
32e791be09
Fix spacing in if statement in tor_version_parse()
2020-05-16 22:26:30 -07:00
Neel Chauhan
2e0d0360cd
Fix spacing in if statement in port_parse_config()
2020-05-16 22:23:59 -07:00
teor
277baf676b
versions: Improve the protover summary comments
...
Part of 33222.
2020-05-15 23:34:43 +10:00
Nick Mathewson
c0dd2a6e39
bump to 0.4.3.5-dev
2020-05-15 09:02:12 -04:00
teor
a702e92c82
protover: Add defines for recent protocol versions
...
Also update the protover/supported_protocols test.
Part of 33226.
2020-05-15 14:59:10 +10:00
teor
c39394afa2
test/circuitbuild: Tests for node selection flags
...
Part of 33222.
2020-05-15 12:22:34 +10:00
Nick Mathewson
75fc33f337
bump to 0.4.3.5
2020-05-14 10:37:42 -04:00
teor
5f577b0f25
circuitbuild: Refactor IPv6 extend node selection
...
Move this complex check into its own function.
Part of 33222.
2020-05-14 22:06:14 +10:00
teor
2e41d82cc5
circuitbuild: Refactor build state node selection flags
...
Move common build state to node selection flags conversion code into its
own function.
Part of 33222.
2020-05-14 22:05:46 +10:00
teor
6a0fdf381d
circuitbuild: test relays sending IPv6 extend cells
...
Add tests for relays sending IPv6 extend cells in
circuit_send_next_onion_skin().
Clients also use this code, check that they can only extend over IPv4
(for now).
Part of 33222.
2020-05-14 21:15:16 +10:00
teor
d41d13ea73
test: Move the origin circuit function to test helpers
...
Part of 33222.
2020-05-14 10:44:56 +10:00
teor
9949b545c8
test/circuitstats: Refactor common code
...
Refactor common circuitstats test code into its own function.
Part of 33222.
2020-05-14 10:38:09 +10:00
teor
e9c9e171ae
test/circuitstats: Fix a bunch of coding style issues
...
Part of 33222.
2020-05-14 10:23:14 +10:00
teor
115a453f04
test/circuitbuild: Add a test for origin_circuit_init()
...
Part of 33222.
2020-05-13 20:06:27 +10:00
Nick Mathewson
1557e73c82
Merge branch 'bug34130_035'
2020-05-12 12:58:19 -04:00
Daniel Pinto
2913dbd6d9
Fix crash when tor is compiled with NSS and seccomp sandbox is enabled
...
Adds seccomp rules for socket and getpeername used by NSS
2020-05-12 12:56:06 -04:00
teor
8829d2d644
nodelist: Fix a comment and a log message
2020-05-11 17:01:49 +10:00
teor
1c1faf586a
routerlist: Choose nodes that can initiate IPv6 extends
...
Part of 33226.
2020-05-11 17:00:25 +10:00
teor
9e7f51e469
circuit: Add flags for IPv6 extends
...
But don't implement the actual node selection yet.
Part of 33226.
2020-05-11 16:54:01 +10:00
teor
c7f085d9bd
protover: Add node functions for IPv6 extend support
...
Part of 33226.
2020-05-11 14:39:42 +10:00
teor
51f32140b4
protover: Sort version flags by their underlying protocols
...
Also fix some comment typos, mainly ">=" when the code says "=".
Part of 33226.
2020-05-11 12:24:06 +10:00
teor
e787e521af
protover: Declare support for Relay=3
...
Declare support for the new Relay=3 IPv6 extend protocol,
in C and Rust.
Part of 33226.
2020-05-11 11:08:20 +10:00
Daniel Pinto
cce16a939c
Improve logging of included config files
2020-05-08 01:10:59 +01:00
Nick Mathewson
b7a165228f
Merge remote-tracking branch 'tor-github/pr/1880/head'
2020-05-07 08:19:11 -04:00
teor
492c512af4
relay: Improve docs on inform_testing_reachability()
...
Document race conditions that we'll resolve in 34067 and 34137.
Part of 33222.
2020-05-07 22:06:13 +10:00
teor
504b16fb75
relay: Rewrite inform_testing_reachability()
...
Rewrite inform_testing_reachability() to use separate buffers for IPv4
ORPort, IPv6 ORPort, and IPv4 DirPort. And use consistent APIs to fill
those buffers.
Part of 33222.
2020-05-07 20:59:10 +10:00
teor
e887887cd3
relay: Clarify a comment in selftest.c
2020-05-07 20:57:14 +10:00
Neel Chauhan
0daa1da3ba
Define and use TOR_ADDRPORT_BUF_LEN
2020-05-07 20:38:25 +10:00
teor
c76f310fe7
routerinfo: Make router_get_orport() return an error status
...
Part of 33222.
2020-05-07 20:25:36 +10:00
teor
e1eecac888
Replace several C identifiers.
...
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
client_or_conn_should_skip_reachable_address_check router_or_conn_should_skip_reachable_address_check \
client_dir_conn_should_skip_reachable_address_check router_dir_conn_should_skip_reachable_address_check
2020-05-07 20:17:57 +10:00
teor
74902c8aca
Wrap long lines
2020-05-07 20:16:56 +10:00
teor
05c56ae455
Replace several C identifiers.
...
This is an automated commit, generated by this command:
./scripts/maint/rename_c_identifier.py \
router_skip_orport_reachability_check router_should_skip_orport_reachability_check \
router_skip_dirport_reachability_check router_should_skip_dirport_reachability_check \
router_connect_assume_or_reachable client_or_conn_should_skip_reachable_address_check \
router_connect_assume_dir_reachable client_dir_conn_should_skip_reachable_address_check
It was generated with --no-verify, so it probably breaks some commit hooks.
The commiter should be sure to fix them up in a subsequent commit.
2020-05-07 20:07:13 +10:00
Nick Mathewson
3a785dd5be
Merge branch 'maint-0.4.3'
2020-05-06 17:17:19 -04:00
Nick Mathewson
b444096be5
Fix a boolean logic error when logging about invalid hostnames.
...
Fixes bug 34131; bugfix on 0.4.3.1-alpha.
2020-05-06 17:15:37 -04:00
Nick Mathewson
b7fcbb28d4
connection_or_finished_flushing(): add a missing "break;"
...
This one is harmless like the others (so far)
2020-05-06 17:09:27 -04:00
Nick Mathewson
e8fdba198e
Merge branch 'maint-0.4.2' into maint-0.4.3
2020-05-06 17:07:47 -04:00
Nick Mathewson
b16c1e4cf6
Merge branch 'maint-0.4.1' into maint-0.4.2
2020-05-06 17:07:27 -04:00
Nick Mathewson
d41f1cd3ed
btrack_orconn_cevent.c: Add a missing "break;"
2020-05-06 17:07:12 -04:00