summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-05-04Merge branch 'maint-0.4.3'Nick Mathewson
2020-04-30Fix a GCC 10.0.1 compilation error.Nick Mathewson
Do not try to stuff "HS_DESC_DECODE_GENERIC_ERROR" (-1) into a socks5_reply_status_t (enum). It doesn't actually make sense, and isn't one of our documented extensions. (This can only happen on a nonfatal assertion that we haven't seen, so it probably isn't happening in practice.) Fixes another case of bug 34077; bugfix on 0.4.3.1-alpha.
2020-04-30Merge branch 'bug34077_042' into bug34077_043Nick Mathewson
2020-04-30Merge branch 'bug34077_041' into bug34077_042Nick Mathewson
2020-04-30Fix a GCC 10.0.1 compilation warning.Nick Mathewson
Fixes 34077 for 0.4.1; bugfix on 0.4.0.3-alpha. (Specifically, GCC first gives this warning for 9eeff921ae7b786d960ea4286d5bba56)
2020-04-30Merge branch 'pr1870_squashed'teor
2020-04-30Define and use TOR_ADDRPORT_BUF_LENNeel Chauhan
2020-04-30relay: Fix a comment typo in the selftest.c headerteor
2020-04-29Merge remote-tracking branch 'tor-github/pr/1864/head'Nick Mathewson
2020-04-30relay: Refactor can extend over IPv6 checksteor
Split "can extend over IPv6" and "has advertised IPv6 ORPort" into separate functions. They currently have the same result, but this may change in 33818 with ExtendAllowIPv6Addresses. Part of 33817.
2020-04-30channel: Refactor matches target address functionteor
Refactor channel_matches_target_addr_for_extend() to return a boolean result. Part of 33817.
2020-04-30relay: Refactor extend address validity functionteor
Rename the function, and give it a boolean return value. No behaviour change. Part of 33817.
2020-04-30net: Make all address bytes functions take uint8_t *teor
Part of 33817.
2020-04-30Rename tor_addr_get_ipv6_bytes to tor_addr_copy_ipv6_bytesteor
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ tor_addr_get_ipv6_bytes tor_addr_copy_ipv6_bytes
2020-04-29relay: Refactor choosing extend IPsteor
Flatten the logic in circuit_choose_ip_ap_for_extend(). Part of 33817.
2020-04-29relay: Add tests for choosing extend IPsteor
Part of 33817.
2020-04-29relay: Refactor circuit_open_connection_for_extend()teor
Refactor circuit_open_connection_for_extend(), splitting out the IP address choice code into a new function. Adds unit tests. No behaviour changes in tor. Part of 33817.
2020-04-29relay: Add IP version tests for circuit extendsteor
Add IPv4-only and IPv6-only tests for circuit_open_connection_for_extend(). Part of 33817.
2020-04-29relay: Choose between IPv4 and IPv6 extends at randomteor
When an EXTEND2 cell has an IPv4 and an IPv6 address, choose one of them uniformly at random. Part of 33817.
2020-04-29relay/circuitbuild: Refactor open connection for extendteor
Re-use the newly created extend_info to launch the connection in circuit_open_connection_for_extend(). No behaviour change. Part of 33817.
2020-04-29test/circuitbuild: Disable some tests when ALL_BUGS_ARE_FATALteor
Some tests use IF_BUG_ONCE(), which is fatal when ALL_BUGS_ARE_FATAL, after the fixes in 33917. Also run "make autostyle" on these changes. Part of 33817.
2020-04-29log/util_bug: Make IF_BUG_ONCE() support ALL_BUGS_ARE_FATALteor
... and DISABLE_ASSERTS_IN_UNIT_TESTS. Make all of tor's assertion macros support the ALL_BUGS_ARE_FATAL and DISABLE_ASSERTS_IN_UNIT_TESTS debugging modes. Implements these modes for IF_BUG_ONCE(). (It used to log a non-fatal warning, regardless of the debugging mode.) Fixes bug 33917; bugfix on 0.2.9.1-alpha.
2020-04-29relay/circuitbuild: Re-use IPv6 connections for circuitsteor
Search for existing connections using the remote IPv4 and IPv6 addresses. Part of 33817.
2020-04-29relay/circuitbuild: Report IPv6 addresses in a debug logteor
Part of 33817.
2020-04-29channel: Make channel_matches_target_addr_for_extend() staticteor
It isn't used outside channel.c. Part of 33817.
2020-04-29relay/circuitbuild: Consider IPv6-only extends validteor
Allow extend cells with IPv6-only link specifiers. Warn and fail if both IPv4 and IPv6 are invalid. Also warn if the IPv4 or IPv6 addresses are unexpectedly internal, but continue with the valid address. Part of 33817.
2020-04-29test/circuitbuild: Show bad addresses in some logsteor
Disable SafeLogging for some extend tests, so we can check the actual addresses. Part of 33817.
2020-04-29relay: Log the address in circuit protocol warningsteor
Always log the address family in extend protocol warnings. If SafeLogging is 0, also log the address and port. Diagnostics for 33817.
2020-04-29net: Add fmt_addrport_ap() and fmt_addr_family()teor
Add fmt_addrport_ap(), a macro that takes a tor_addr_port_t, and uses it to call fmt_addrport(). Add fmt_addr_family(), a function that returns a string constant describing the address family. Utility functions for 33817.
2020-04-29net: Remove an extra space in address.hteor
2020-04-29relay: Refactor address checks into a functionteor
No behaviour change. Part of 33817.
2020-04-29relay: Refactor address and port checksteor
tor_addr_port_is_valid_ap(ap, 0) checks if the address or port are zero, exactly like the previous code. Preparation for 33817.
2020-04-29core/or: Check extends for zero addresses and portsteor
Check for invalid zero IPv4 addresses and ports, when sending and receiving extend cells. Fixes bug 33900; bugfix on 0.2.4.8-alpha.
2020-04-29test/cell_formats: Expand the IPv6-only EXTEND2 testteor
Part of 33901.
2020-04-29core/or: Support IPv6 EXTEND2 cellsteor
Allow clients and relays to send dual-stack and IPv6-only EXTEND2 cells. Parse dual-stack and IPv6-only EXTEND2 cells on relays. Relays do not make connections or extend circuits via IPv6: that's the next step. Closes ticket 33901.
2020-04-29Merge remote-tracking branch 'tor-github/pr/1868/head'Nick Mathewson
2020-04-29Run "make autostyle"teor
2020-04-29rand: Clarify the crypto_rand_uint() rangeteor
2020-04-29nodelist: Remove an outdated commentteor
Part of 33817.
2020-04-28channeltls: Clarify a relay impersonation defenceteor
Clarify the comments in channel_tls_matches_target_method(), and make it clear that the attack is a covert attack.
2020-04-24Merge remote-tracking branch 'onionk/inbufoverflow1-043' into ticket33131_044Nick Mathewson
2020-04-24Merge remote-tracking branch 'tor-github/pr/1862/head'Nick Mathewson
2020-04-21Merge branch 'maint-0.4.3'Nick Mathewson
2020-04-21channeltls: Stop truncating IPv6 in logsteor
Stop truncating IPv6 addresses and ports in channel and connection logs. Fixes bug 33918; bugfix on 0.2.4.4-alpha.
2020-04-15test/channel: Fix a comment typoteor
2020-04-14Merge remote-tracking branch 'tor-github/pr/1860/head'Nick Mathewson
2020-04-14core/or: Update file comment in connection_or.cteor
Fix a typo, and say "v3 (and later) handshake". Comment-only change.
2020-04-14core/or: Accurately log remote relay IPv6 addressesteor
Log IPv6 addresses on connections where this relay is the responder. Previously, responding relays would replace the remote IPv6 address with the IPv4 address from the consensus. (The port is replaced with the IPv6 ORPort from the consensus, we will resolve this issue in 33898.) Fixes bug 33899; bugfix on 0.3.1.1-alpha.
2020-04-14core/or: Allow IPv6 connections to be canonicalteor
Consider IPv6 addresses when checking if a connection is canonical. In 17604, relays assumed that a remote relay could consider an IPv6 connection canonical, but did not set the canonical flag on their side of the connection. Fixes bug 33899; bugfix on 0.3.1.1-alpha.
2020-04-14core/or: Remove unused function prototypeteor
Remove the unused function prototype for connection_or_get_for_extend(). There is no function implementation. Part of 33817.