summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix timestamp parser in new load_stats_file.karsten/ticket40226_045_01Karsten Loesing2020-12-16
| | | | | | | | | | | The previous parser only considered stats files _starting_ with the timestamp tag, not stats files having the timestamp tag in a later position. While this applies to all current stats files, a future stats file might look differently. Better to fix the function now than be surprised in another 9 years from now. This commit also adds a test case for such future stats, and it fixes stats file paths in newly added unit tests.
* relay: Report the entire content of a stats fileDavid Goulet2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that 9 years ago, we stopped appending data into stats file and rather overwrite everytime we have new stats (see commit a6a127c833eace1100aca7ab8ad118862bb8a8b9) The load_stats_file() function was still thinking that we could have the same line many times in the file which turns out to be false since 9 years ago. However, that did not cause problem until IPv6 connection stats came along which introduced a new line in conn-stats: "ipv6-conn-bi-direct ...". Before, that file contained a single line starting with the tag "conn-bi-direct". That very tag appears also in the IPv6 tag (see above) so the load_stats_file() function would consider that the IPv6 line as the last tag to be appeneded to the file and fail to report the line above (for IPv4). It would actually truncate the IPv6 line and report it (removing the "ipv6-" part). In other words, "conn-bi-direct" was not reported and instead "ipv6-conn-bi-direct" was used without the "ipv6-" part. This commit refactors the entire function so that now it looks for a "timestamp tag" to validate and then if everything is fine, returns the entire content of the file. The refactor simplifies the function, adds logging in case of failures and modernize it in terms of coding standard. Unit tests are also added that makes sure the loaded content matches the entire file if timestamp validation passes. Fixes #40226 Signed-off-by: David Goulet <dgoulet@torproject.org>
* Merge remote-tracking branch 'tor-gitlab/mr/205' into maint-0.4.5George Kadianakis2020-12-15
|\
| * Avoid sandbox bug warning when unglobbing patterns #40094Daniel Pinto2020-12-08
| | | | | | | | | | | | Adds a more user-friendly error message when the configuration is reloaded and a new %include is added that makes its unglobbing access files/folders not allowed by the seccomp sandbox.
| * Fix a couple of documentation comments related to #40094Nick Mathewson2020-12-08
| |
| * When handling includes, detect missing interned strings earlier.Nick Mathewson2020-11-12
| | | | | | | | | | | | | | There were three separate places where we were hitting a sandbox Bug warning before we actually exited. Fixes #40094; bugfix on 0.3.1.1-alpha when %includes were introduced.
* | relay: Avoid log reachability test for bandwidth test circuitDavid Goulet2020-12-08
| | | | | | | | | | | | Fixes #40205 Signed-off-by: David Goulet <dgoulet@torproject.org>
* | configure: Fix the --enable-static-tor switchDavid Goulet2020-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "-static" compile flag was set globally which means that all autoconf test were attempting to be built statically and lead to failures of detecting OpenSSL libraries and others. This commit adds this flag only to the "tor" binary build. There is also a fix on where to find libevent.a since it is using libtool, it is in .libs/. At this commit, there are still warnings being emitted that informs the user that the built binary must still be linked dynamically with glibc. Fixes #40111 Signed-off-by: David Goulet <dgoulet@torproject.org>
* | bump to 0.4.5.2-alpha-devNick Mathewson2020-11-23
| |
* | Bump to 0.4.5.2-alpha.Nick Mathewson2020-11-21
| |
* | Merge branch 'maint-0.4.4' into maint-0.4.5Alexander Færøy2020-11-19
|\ \
| * \ Merge branch 'maint-0.4.3' into maint-0.4.4Alexander Færøy2020-11-19
| |\ \
| | * \ Merge remote-tracking branch 'tor-gitlab/mr/196' into maint-0.4.3Alexander Færøy2020-11-19
| | |\ \
| | | * | Make config/parse_tcp_proxy_line work in the presence of DNS hijackingNick Mathewson2020-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use our existing mocking functionality to do this: We have been in this position before. Fixes part of #40179; bugfix on 0.4.3.1-alpha.
* | | | | config: Bridge line with a transport must have a ClientTransportPluginDavid Goulet2020-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #25528 Signed-off-by: David Goulet <dgoulet@torproject.org>
* | | | | Merge branch 'tor-gitlab/mr/144' into maint-0.4.5David Goulet2020-11-18
|\ \ \ \ \
| * | | | | build: updated configure.ac to allow mingw builds with static openssl and ↵Richard Pospesel2020-09-14
| | | | | | | | | | | | | | | | | | | | | | | | libevent
* | | | | | sendme: Turn log warning into debugDavid Goulet2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When sending the stream level SENDME, it is possible the cirucit was marked for close or any other failures that can occur. These events can occur naturally. Fixes #40142 Signed-off-by: David Goulet <dgoulet@torproject.org>
* | | | | | Merge branch 'tor-gitlab/mr/203' into maint-0.4.5David Goulet2020-11-17
|\ \ \ \ \ \
| * | | | | | Deliberately close OR connections if proxies leave extra dataNick Mathewson2020-11-12
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already did this, but we did it by accident, which is pretty risky: if we hadn't, then our code would have treated extra data in the inbuf as having been transmitted as TLS-authenticated data. Closes ticket 40017; Found by opara.
* | | | | | config: Really ignore non ORPorts when removing duplicatesDavid Goulet2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function in charge of removing duplicate ORPorts from our configured ports was skipping all non ORPorts port but only for the outer loop thus resulting in comparing an ORPort with a non-ORPort which lead to problems. For example, tor configured with the following would fail: ORPort auto DirPort auto Both end up being the same configuration except that one is a OR listener and one is a Dir listener. Thus because of the missing check in the inner loop, they looked exactly the same and thus one is removed. Fixes #40195 Signed-off-by: David Goulet <dgoulet@torproject.org>
* | | | | | Merge branch 'ticket40071_045_01_squashed' into masterNick Mathewson2020-11-17
|\ \ \ \ \ \
| * | | | | | changes: Add file for #40071David Goulet2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: David Goulet <dgoulet@torproject.org>
| * | | | | | relay: Launch dummy circuit only when descriptor build failsDavid Goulet2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First, this commit moves the launch_dummy_circuit_as_needed() function into relay_find_addr.c and renames it to relay_addr_learn_from_dirauth(). This is an attempt to centralize anything relate with address discovery in the right module. Second, when building a descriptor and we fail to discover our address, immediately launch a dummy circuit to an authority in an attempt to learn our descriptor. It is still only done every 20 minutes even though the descriptor build is done every minute. We ought to avoid load on the authority and if we can't learn in the first place our address from them, chances are more things are wrong. Related to #40071 Signed-off-by: David Goulet <dgoulet@torproject.org>
| * | | | | | relay: Look at our cache when looking for an IP changeDavid Goulet2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regularly, tor looks if its IP has changed. It does the entire auto discovery process again. However, it is possible that it does not find anything. Instead of thinking the IP changed to an unknown address, look at our cache and see if that value has changed. The reason for this is because if tor gets its address as a suggestion from a directory authority, it is because the auto discovery failed and thus that address should be consider for the IP change check. Related to #40071 Signed-off-by: David Goulet <dgoulet@torproject.org>
| * | | | | | relay: Use testing circuit instead of dummy descriptor fetchDavid Goulet2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tor now can learn its address from a NETINFO cell coming from an authority. Thus, instead from launching a dummy descriptor fetch to learn the address from the directory response (unauthenticated), we simply now launch a one-hop testing circuit. Related to #40071 Signed-off-by: David Goulet <dgoulet@torproject.org>
* | | | | | | Merge remote-tracking branch 'tor-gitlab/mr/197' into masterNick Mathewson2020-11-16
|\ \ \ \ \ \ \
| * | | | | | | Rename OpenSSL_version_num() as defined in TorNick Mathewson2020-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way, if we guess wrong about whether the library has it, we don't conflict with the library's headers. Fixes #40181; bug not in any released version.
* | | | | | | | Merge branch 'maint-0.4.4' into masterNick Mathewson2020-11-16
|\ \ \ \ \ \ \ \ | | |_|_|_|/ / / | |/| | | | | |
| * | | | | | | Merge branch 'maint-0.4.3' into maint-0.4.4Nick Mathewson2020-11-16
| |\ \ \ \ \ \ \ | | | |_|_|_|/ / | | |/| | | | |
| | * | | | | | Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson2020-11-16
| | |\ \ \ \ \ \
| | | * \ \ \ \ \ Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5Nick Mathewson2020-11-16
| | | |\ \ \ \ \ \
| | | | * | | | | | Handle a change in the implementation of hashlib in Python 3.9Nick Mathewson2020-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, hashlib.shake_256 was a class (if present); now it can also be a function. This change invalidated our old compatibility/workaround code, and made one of our tests fail. Fixes bug 40179; bugfix on 0.3.1.6-rc when the workaround code was added.
* | | | | | | | | | port: Don't ignore ports of a different familyDavid Goulet2020-11-13
| |_|_|_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit c3a0f757964de0e8a24911d72abff5df20bb323c added this feature for ORPort that we ignore any port that is not the family of our default address when parsing the port. So if port_parse_config() was called with an IPv4 default address, all IPv6 address would be ignored. That makes sense for ORPort since we call twice port_parse_config() for 0.0.0.0 and [::] but for the rest of the ports, it is not good since a perfectly valid configuration can be: SocksPort 9050 SocksPort [::1]:9050 Any non-ORPort only binds by default to an IPv4 except the ORPort that binds to both IPv4 and IPv6 by default. The fix here is to always parse all ports within port_parse_config() and then, specifically for ORPort, remove the duplicates or superseding ones. The warning is only emitted when a port supersedes another. A unit tests is added to make sure SocksPort of different family always exists together. Fixes #40183 Signed-off-by: David Goulet <dgoulet@torproject.org>
* | | | | | | | | Use connection_or_change_state() in v3 handshaking state changeNeel Chauhan2020-11-12
| | | | | | | | |
* | | | | | | | | Fix typos.Samanta Navarro2020-11-12
| |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | | | | | Merge branch 'ticket40187' into masterNick Mathewson2020-11-12
|\ \ \ \ \ \ \ \
| * | | | | | | | Fake the current time when we're loading TEST_DESCRIPTORS.Nick Mathewson2020-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 40187; bugfix on 0.4.5.1-alpha.
* | | | | | | | | Correct EOL date for 0.4.3.xNick Mathewson2020-11-12
|/ / / / / / / /
* | | | | | | | Merge remote-tracking branch 'tor-gitlab/mr/183' into masterNick Mathewson2020-11-12
|\ \ \ \ \ \ \ \
| * | | | | | | | Avoid asserts with flagNeel Chauhan2020-10-27
| | | | | | | | |
* | | | | | | | | Merge branch 'maint-0.4.4' into masterNick Mathewson2020-11-12
|\ \ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | | | | | | | | | | | "ours" to avoid version bump.
| * | | | | | | | Bump to 0.4.4.6-devNick Mathewson2020-11-12
| | | | | | | | |
| * | | | | | | | Merge branch 'maint-0.4.3' into maint-0.4.4Nick Mathewson2020-11-12
| |\ \ \ \ \ \ \ \ | | | |/ / / / / / | | |/| | | | | | | | | | | | | | | "ours" to avoid version bump.
| | * | | | | | | Bump to 0.4.3.7-devNick Mathewson2020-11-12
| | | | | | | | |
| | * | | | | | | Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson2020-11-12
| | |\ \ \ \ \ \ \ | | | | |/ / / / / | | | |/| | | | | | | | | | | | | | "ours" to avoid version bump.
| | | * | | | | | Bump to 0.3.5.12-devNick Mathewson2020-11-12
| | | | | | | | |
* | | | | | | | | Copy ChangeLog and ReleaseNotes from today's releases to master branchNick Mathewson2020-11-12
| | | | | | | | |
* | | | | | | | | changes file for bug 40172.Nick Mathewson2020-11-10
| | | | | | | | |
* | | | | | | | | Export RANLIB so it's available in combine_libs scriptMatthew Finkel2020-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes 40172; bugfix on 0.4.5.1-alpha