summaryrefslogtreecommitdiff
path: root/changes
AgeCommit message (Collapse)Author
2020-12-21relay: Report the entire content of a stats fileDavid Goulet
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>
2020-12-08relay: Avoid log reachability test for bandwidth test circuitDavid Goulet
Fixes #40205 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-08configure: Fix the --enable-static-tor switchDavid Goulet
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>
2020-11-19Merge branch 'maint-0.4.4' into maint-0.4.5Alexander Færøy
2020-11-19Merge branch 'maint-0.4.3' into maint-0.4.4Alexander Færøy
2020-11-19Merge remote-tracking branch 'tor-gitlab/mr/196' into maint-0.4.3Alexander Færøy
2020-11-18config: Bridge line with a transport must have a ClientTransportPluginDavid Goulet
Fixes #25528 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-17sendme: Turn log warning into debugDavid Goulet
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>
2020-11-17Merge branch 'tor-gitlab/mr/203' into maint-0.4.5David Goulet
2020-11-17config: Really ignore non ORPorts when removing duplicatesDavid Goulet
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>
2020-11-17Merge branch 'ticket40071_045_01_squashed' into masterNick Mathewson
2020-11-17changes: Add file for #40071David Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-16Merge branch 'maint-0.4.4' into masterNick Mathewson
2020-11-16Merge branch 'maint-0.4.3' into maint-0.4.4Nick Mathewson
2020-11-16Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson
2020-11-16Merge remote-tracking branch 'tor-gitlab/mr/195' into maint-0.3.5Nick Mathewson
2020-11-13port: Don't ignore ports of a different familyDavid Goulet
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>
2020-11-12Use connection_or_change_state() in v3 handshaking state changeNeel Chauhan
2020-11-12Deliberately close OR connections if proxies leave extra dataNick Mathewson
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.
2020-11-12Fake the current time when we're loading TEST_DESCRIPTORS.Nick Mathewson
Fixes bug 40187; bugfix on 0.4.5.1-alpha.
2020-11-12Merge remote-tracking branch 'tor-gitlab/mr/183' into masterNick Mathewson
2020-11-10changes file for bug 40172.Nick Mathewson
2020-11-09Merge branch 'maint-0.4.3' into maint-0.4.4Nick Mathewson
2020-11-09Merge branch 'maint-0.3.5' into maint-0.4.3Nick Mathewson
2020-11-09Merge remote-tracking branch 'tor-gitlab/mr/189' into maint-0.3.5Nick Mathewson
2020-11-09Merge remote-tracking branch 'tor-gitlab/mr/193'Alexander Færøy
2020-11-09Merge remote-tracking branch 'tor-gitlab/mr/190'Alexander Færøy
2020-11-05Make config/parse_tcp_proxy_line work in the presence of DNS hijackingNick Mathewson
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.
2020-11-05Handle a change in the implementation of hashlib in Python 3.9Nick Mathewson
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.
2020-11-03Merge remote-tracking branch 'tor-gitlab/mr/185' into masterGeorge Kadianakis
2020-11-03configure: Check STAP_PROBEV macro when building with USDT tracingDavid Goulet
It turns out that STAP_PROBEV() is not available on FreeBSD thus having sdt/sdt.h is not enough. Look for it now at configure time. Closes #40174 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-11-03Merge remote-tracking branch 'tor-gitlab/mr/187' into masterGeorge Kadianakis
2020-11-02Merge branch 'tor-gitlab/mr/186'David Goulet
2020-11-02Merge branch 'tor-gitlab/mr/188'David Goulet
2020-11-02Fix another duplicate typedef.Nick Mathewson
Fixes #40177; bugfix on 0.4.5.1-alpha.
2020-11-01Implement WIN32 tor_cond_wait using condition variables #30187Daniel Pinto
Fix bug where running a relay on Windows would use 100% CPU after some time. Makes Windows >= Vista the required Windows version to build and run tor.
2020-10-30Start a changelog for 0.4.5.1-alpha.Nick Mathewson
2020-10-30Merge branch 'bug40080_035'Nick Mathewson
2020-10-30Merge remote-tracking branch 'tor-gitlab/mr/174' into masterGeorge Kadianakis
2020-10-28Remove "GETINFO network-status".Nick Mathewson
It was deprecated 0.3.1.1-alpha. According to #22473, nothing uses it. Closes #22473.
2020-10-28Merge branch 'maint-0.4.3' into maint-0.4.4Alexander Færøy
2020-10-28Merge branch 'maint-0.3.5' into maint-0.4.3Alexander Færøy
2020-10-28Log a warning if Tor was built with any "risky" compile-time optionsNick Mathewson
These options are meant for testing builds only, and are likely to cause trouble if used in a production environment. Closes #18888.
2020-10-28Merge remote-tracking branch 'tor-gitlab/mr/171'Alexander Færøy
2020-10-28Fix a previously overstrict log message check.Nick Mathewson
OpenSSL doesn't seem to report error locations in the same way as before, which broke one of our tests. Fixes bug 40170; bugfix on 0.2.8.1-alpha.
2020-10-28Changes file for #40165 (openssl deprecation warnings)Nick Mathewson
2020-10-28Revise fix for bug 32178 (spaces at end of log msg).Nick Mathewson
The loop in the earlier patch would invoke undefined behavior in two ways: First, it would check whether it was looking at a space before it checked whether the pointer was in-range. Second, it would let a pointer reach a position _before_ the start of a string, which is not allowed. I've removed the assertion about empty messages: empty messages can be their own warning IMO. I've also added tests for this formatting code, to make sure it actually works.
2020-10-28adds change fileAmadeusz Pawlik
2020-10-27Avoid asserts with flagNeel Chauhan
2020-10-27changes: File for ticket 40063, the MetricsPortDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>