summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-07-17or_connection_t: replace real_addr with canonical_orport.Nick Mathewson
Instead of replacing connection_t.{addr,port} with a canonical orport, and tracking the truth in real_addr, we now leave connection_t.addr alone, and put the canonical address in canonical_orport. Closes #40042 Closes #33898
2020-07-17Add a tor_addr_port_copy() function.Nick Mathewson
2020-07-16Remove unneeded generate_ed_link_cert() in tests.Nick Mathewson
This fixes CID 1465291, which was a complaint that we never actually checked the return value of this function. It turns out that this function was failing, and it didn't matter, because it wasn't necessary for this test.
2020-07-16Merge branch 'tor-gitlab/mr/54'David Goulet
2020-07-16Changes file for CONST_TO_*() functions.Nick Mathewson
Closes #40046.
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 const variants for our channel_tls_t* casts.Nick Mathewson
2020-07-16Merge branch 'tor-gitlab/merge-requests/53'Alexander Færøy
2020-07-16doc: Document circuit subsystem tracing eventsDavid Goulet
Create a doc/tracing/ directory to contain a top level README.md which is the previously named Tracing.md and add the EventsCircuit.md which describes the circuit subsystem tracing events in depth. Closes #40036 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-16Add unit tests for connection_describe().Nick Mathewson
2020-07-16Improvements to output format for OR connection descriptions.Nick Mathewson
Only log the 'real_addr' when it is set to something. Only log the ID when it is set. When scrubbing the address, don't include a canonical address. (There should never be a canonical address for a connection with no ID set.)
2020-07-16Changes file for 40041.Nick Mathewson
Closes #40041.
2020-07-16Collapse channel_get_*_remote_addr() into a single function.Nick Mathewson
Since we can list the real address and the canonical one in a human-readable format we don't need to pick.
2020-07-16Refactor channel description internals.Nick Mathewson
Now that we've clarified that these functions only need to describe the peer in a human-readable way, we can have them delegate to connection_describe_peer().
2020-07-16channelpadding: don't call method pointer directly.Nick Mathewson
2020-07-16Remove "ADDR_ONLY" mode from channel_get_*_remote_descr.Nick Mathewson
This mode was only used in one place, and it caused a dangerous mingling of functionality. The method is supposed to _describe_ the peer's address, not give its actual address. We already had a function to get the actual address.
2020-07-16Minor refactoring on channel_get_remote_addr_if_possible()Nick Mathewson
* We no longer call this an optional method * We document that it returns the real address, not a canonical one. * We have it try harder if the real address hasn't been set yet.
2020-07-16Update test_rebind.py to expect new format.Nick Mathewson
2020-07-16Use connection_describe() for log messages.Nick Mathewson
2020-07-16connection_describe_peer(): add nonzero ports to nonscrubbed addrs.Nick Mathewson
2020-07-15Apply SafeLogging in connection_describe_peer().Nick Mathewson
2020-07-15New functions to describe connections and peers.Nick Mathewson
These will let us refactor away a lot of code that currently uses "addr" and "address" for logging purposes.
2020-07-14Merge remote-tracking branch 'tor-gitlab/mr/50'Nick Mathewson
2020-07-14Update docstring for read_file_to_str() on stripping of CR characters.Alexander Færøy
See: https://bugs.torproject.org/tpo/core/tor/33781
2020-07-14Strip '\r' characters when reading text files on Unix.Alexander Færøy
This patch ensures that we strip "\r" characters on both Windows as well as Unix when we read text files. This should prevent the issue where some Tor state files have been moved from a Windows machine, and thus contains CRLF line ending, to a Unix machine where only \n is needed. We add a test-case to ensure that we handle this properly on all our platforms. See: https://bugs.torproject.org/tpo/core/tor/33781
2020-07-14Merge remote-tracking branch 'tor-gitlab/merge-requests/48'Alexander Færøy
2020-07-14Merge branch 'tor-gitlab/mr/49'David Goulet
2020-07-14Merge branch 'ticket40033_045_01_squashed'Nick Mathewson
2020-07-14Rename blacklist and whitelist wordingDavid Goulet
Closes #40033 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14node: Standardize interface of format_node_description()David Goulet
Pass the IPv4 before the IPv6 like all our other interfaces. Changes unreleased code related to #40043. Closes #40045 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14Merge branch 'maint-0.4.4'Alexander Færøy
2020-07-14Merge remote-tracking branch 'tor-gitlab/merge-requests/43' into maint-0.4.4Alexander Færøy
2020-07-14Merge branch 'tor-gitlab/mr/47'David Goulet
2020-07-14addr: Use tor_addr_t instead of uint32_t for IPv4David Goulet
This changes a LOT of code but in the end, behavior is the same. Unfortunately, many functions had to be changed to accomodate but in majority of cases, to become simpler. Functions are also removed specifically those that were there to convert an IPv4 as a host format to a tor_addr_t. Those are not needed anymore. The IPv4 address field has been standardized to "ipv4_addr", the ORPort to "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport". This is related to Sponsor 55 work that adds IPv6 support for relays and this work is needed in order to have a common interface between IPv4 and IPv6. Closes #40043. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14doc: Fix aesthetic issues in HACKING/Tracing.mdDavid Goulet
Remove all the escape character "\" which is not needed for Markdown files. This also fixes the tracing event include to the correct path. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14conn: Fix doxygen comment in connstats.cDavid Goulet
Issue found by our CI: https://travis-ci.org/github/torproject/tor/jobs/707731598#L6059 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-14doc: Move manpages into doc/man/David Goulet
Closes #40044 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-13Merge branch 'maint-0.4.4'David Goulet
2020-07-13Merge branch 'maint-0.4.3' into maint-0.4.4David Goulet
2020-07-13Improve docs for addr, address, and real_addr fieldsNick Mathewson
These fields have a complicated history, some slightly complicated behavior, and some definitely inadequate documentation. Before we go fixing them up, let's document how they work now.
2020-07-13Merge branch 'maint-0.4.4'Nick Mathewson
2020-07-13Changes file for ticket 31812.Nick Mathewson
2020-07-13Bug 31812: Change http URL's to httpsJeremyRand
2020-07-13Merge branch 'ticket33919'Nick Mathewson
2020-07-13Update channel_matches_target_addr_for_extend test to current APINick Mathewson
2020-07-13Added testsMrSquanchee
Added tests for channel_matches_target_addr_for_extend(). Ticket #33919.
2020-07-13Remove check-cocci from check-local target.Nick Mathewson
check-cocci is still a good idea -- perhaps as a cron job? But doing it as part of our regular tests has just been confusing, especially to volunteers who shouldn't have to become coccinelle experts in order to get their patches through our CI. Closes #40030.
2020-07-13Syntax highlighting in the docsGuinness
This adds the syntax highlights in the MarkDown files. Fixes #33741