aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control
AgeCommit message (Collapse)Author
2020-10-19Explain why we use "mark_as_used_for_origin_circuit" where we doNick Mathewson
Also, explain why it's relevant for bootstrapping. This is a comments-only patch.
2020-09-18Add flag for whether an OR conn "counts" for bootstrap trackingNick Mathewson
We set this flag if we've launched the connection in order to satisfy an origin circuit, or when we decide the connection _would_ satisfy an origin circuit. These are the only or_connections we want to consider for bootstrapping: other or_connections are opened because of client EXTEND requests, and they may succeed or fail because of the clients' confusion or misconfiguration. Closes #25061.
2020-08-20Merge branch 'maint-0.4.4'George Kadianakis
2020-08-20v3 control: Persist ONION_CLIENT_AUTH_ADD client nameNeel Chauhan
2020-08-11Remove extraneous EVENT_CONTROLLER_WAITNick Mathewson
This turned into a new StreamStatus value. Closes #40092. Bug not in any released Tor.
2020-08-04ipv6: Specialize GETINFO address interface for v4 and v6Neel Chauhan
2020-08-03Merge remote-tracking branch 'tor-github/pr/1986/head'Nick Mathewson
2020-07-31Code simplifications for AP_CONN_STATE_CONTROLLER_WAITNeel Chauhan
2020-07-29Merge remote-tracking branch 'tor-github/pr/1987/head'Nick Mathewson
2020-07-20relay: Use flags in relay_find_addr_to_publish()David Goulet
Instead of a boolean saying "cache_only" add the concept of flags so we add semantic through out the code and allow ourselves to have more options in the future. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-20control: With GETINFO, don't trigger an address resolveDavid Goulet
Tell the relay find address interface to only use the cache so we don't trigger an address resolve everytime the "GETINFO address" is called. Related #40025 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-20control: GETINFO address/ use new find address APIDavid Goulet
At the moment, this command only returns the IPv4. Do so by using the new relay_find_addr_to_publish(). New commands to return IPv4 and IPv6 will be done with the work in tor#40039. Related to #40025 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-16Use CONST_TO_* macros in more places.Nick Mathewson
This is an automated commit made with a python script. After running the automated script, I had to hand-revert the cases where it made the conversion functions call themselves. Additionally, I had to edit a variable declaration in control_bootstrap.c so that the result of a const cast could be put in a const field.
2020-07-16Define new CONST_TO_*_CONN() functions for const-to-const castsNick Mathewson
These names are analogous to the CONST_TO_*_CIRC() functions we have for circuits. Part of #40046.
2020-07-16Improve documentation for our TO_*_CONN() cast functions.Nick Mathewson
Preliminary work for #40046.
2020-07-08Remove duplicate #include control_events.h in control_cmd.cNeel Chauhan
2020-07-08Send a control port event when a stream enters the ↵Neel Chauhan
AP_CONN_STATE_CONTROLLER_WAIT state
2020-07-02Extract extend_info manipulation functions into a new file.Nick Mathewson
2020-07-01Merge branch 'tor-github/pr/1907'David Goulet
2020-07-01control: Add a key to GETINFO to fetch the circuit onion handshake rephist ↵Neel Chauhan
values
2020-06-26Merge branch 'assume_reachable_revamp'Nick Mathewson
2020-06-24Merge branch 'tor-github/pr/1935'David Goulet
2020-06-24Make HSFETCH take the decoded length into account, not the base32 oneNeel Chauhan
2020-06-24Rename router_should_skip_orport_reachability_check.Nick Mathewson
This was supposed to happen in #40012, but the command line was wrong. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_should_skip_orport_reachability_check router_all_orports_seem_reachable
2020-06-24Replace router_should_skip_*() identifiers.Nick Mathewson
These identifiers are confusing and unreadable. I think these replacements should be better. Closes ticket #40012. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ router_should_skip_orport_reachability_check_family router_orport_seems_reachable \ router_should_skip_dirport_reachability_check router_dirport_seems_reachable \ router_should_skip_dirport_reachability_check router_all_orports_seem_reachable
2020-06-23Merge branch 'tor-github/pr/1943'George Kadianakis
2020-06-23Relocate CBT event to control_events.cMike Perry
Needed to satisfy practracker.
2020-06-23Mark state file dirty upon DROPTIMEOUTS commandMike Perry
2020-06-22Merge branch 'maint-0.4.4'David Goulet
2020-06-22Consistently use 'address' in Invalid v3 address responses to ↵Miguel Jacq
ONION_CLIENT_AUTH commands
2020-06-09Merge remote-tracking branch 'tor-github/pr/1888/head'Nick Mathewson
2020-06-07Provide a DROPTIMEOUTS command to drop CBT timesMike Perry
This allows us to reset CBT when we change guards in fixed-guards onionperf instances (#33325 and children).
2020-06-05Merge remote-tracking branch 'tor-github/pr/1902/head'Nick Mathewson
2020-05-21Merge branch 'tor-github/pr/1861'George Kadianakis
2020-05-21Check for NULL from tor_dup_ip()rl1987
2020-05-07Merge remote-tracking branch 'tor-github/pr/1880/head'Nick Mathewson
2020-05-07Wrap long linesteor
2020-05-07Replace several C identifiers.teor
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-06Merge branch 'maint-0.4.3'Nick Mathewson
2020-05-06Merge branch 'maint-0.4.2' into maint-0.4.3Nick Mathewson
2020-05-06Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-05-06btrack_orconn_cevent.c: Add a missing "break;"Nick Mathewson
2020-05-06Merge branch 'maint-0.4.3'Nick Mathewson
Amazingly, this time we had no merge conflicts with "falls through" comments.
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.3 version.)
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.2 version.)
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.1 version.)
2020-05-05relay: Rename relay_resolve_addr.{c|h} fileDavid Goulet
New name is more accurate semantically. Closes #33789 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-05relay: New file relay_resolve_addr.{c|h}David Goulet
This commit moves router_pick_published_address() and the related helper functions into the new file. The log_addr_has_changed() function has been made public in router.h so we can use it in relay_resolve_addr.c. This is a refactoring as part of Sponsor 55. Only code movement at this commit. Part of #33789 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-04-30relay: Clarify reachability status check functionsteor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ check_whether_orport_reachable router_skip_orport_reachability_check \ check_whether_dirport_reachable router_skip_dirport_reachability_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. Part of 33222.
2020-04-13Merge branch 'maint-0.4.3'Nick Mathewson