aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-11-25Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1441' into maint-0.4.0teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1396' into maint-0.4.0teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1464' into maint-0.3.5teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1422' into maint-0.3.5teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1405' into maint-0.3.5teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1395' into maint-0.3.5teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1394' into maint-0.3.5teor
2019-11-11Merge branch 'maint-0.3.5' into maint-0.4.0Nick Mathewson
2019-11-11Merge branch 'maint-0.2.9' into maint-0.3.5Nick Mathewson
2019-11-09Update geoip and geoip6 to the November 6 2019 database.Karsten Loesing
2019-11-06Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-11-06Merge branch 'maint-0.2.9' into maint-0.3.5teor
2019-11-06Merge remote-tracking branch 'tor-github/pr/1354' into maint-0.3.5teor
2019-11-06Merge remote-tracking branch 'tor-github/pr/1348' into maint-0.3.5teor
2019-11-06Merge remote-tracking branch 'tor-github/pr/1340' into maint-0.3.5teor
2019-11-06Merge remote-tracking branch 'tor-github/pr/1343' into maint-0.3.5teor
2019-11-06Merge remote-tracking branch 'tor-github/pr/1342' into maint-0.2.9teor
2019-11-06Merge remote-tracking branch 'tor-github/pr/1330' into maint-0.2.9teor
2019-10-24hs-v3: Remove a BUG() caused by an acceptable raceDavid Goulet
hs_client_purge_state() and hs_cache_clean_as_client() can remove a descriptor from the client cache with a NEWNYM or simply when the descriptor expires. Which means that for an INTRO circuit being established during that time, once it opens, we lookup the descriptor to get the IP object but hey surprised, no more descriptor. The approach here is minimalist that is accept the race and close the circuit since we can not continue. Before that, the circuit would stay opened and the client wait the SockTimeout. Fixers #28970. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-23Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-10-23Merge remote-tracking branch 'tor-github/pr/1284' into maint-0.3.5teor
2019-10-23Merge remote-tracking branch 'tor-github/pr/1256' into maint-0.3.5teor
2019-10-23Merge remote-tracking branch 'tor-github/pr/1178' into maint-0.2.9teor
2019-10-21respect accountingmax during soft hibernationRoger Dingledine
Relays now respect their AccountingMax bandwidth again. When relays entered "soft" hibernation (which typically starts when we've hit 90% of our AccountingMax), we had stopped checking whether we should enter hard hibernation. Soft hibernation refuses new connections and new circuits, but the existing circuits can continue, meaning that relays could have exceeded their configured AccountingMax. This commit rolls back some of the cpu-saving fixes, where we tried to avoid calling so many of our events while we're off the network. That's because PERIODIC_EVENT_FLAG_NEED_NET checks net_is_disabled(), which returns true even if we're only in soft hibernation. Fixes bug 32108; bugfix on 0.4.0.1-alpha.
2019-10-20test/rebind: Make control formatting and log parsing more robustteor
* actually sleep when tor has not logged anything * log at debug level when waiting for tor to log something * backslash-replace bad UTF-8 characters in logs * format control messages as ASCII: tor does not accept UTF-8 control commands Fixes bug 31837; bugfix on 0.3.5.1-alpha.
2019-10-17Remove overly strict assertions in transports.c.Alexander Færøy
This patch removes an overly strict tor_assert() and an ignorable BUG() expression. Both of these would trigger if a PT was unable to configure itself during startup. The easy way to trigger this is to configure an obfs4 bridge where you make the obfs4 process try to bind on a port number under 1024. See: https://bugs.torproject.org/31091
2019-10-17mainloop: Disable periodic events before a destroyDavid Goulet
When tearing down all periodic events during shutdown, disable them first so their enable flag is updated. This allows the tor_api.h to relaunch tor properly after a clean shutdown. Fixes #32058 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-09Stop libevent from reading data from closed connections.George Kadianakis
Code adapted from Rob's proposed patch in #30344. Also add a comment in connection_mark_for_close_internal_() on why we should not be adding extra code there without a very good reason.
2019-10-07hs-v3: Make service pick the exact amount of intro pointsDavid Goulet
When encoding introduction points, we were not checking if that intro points had an established circuit. When botting up, the service will pick, by default, 3 + 2 intro points and the first 3 that establish, we use them and upload the descriptor. However, the intro point is removed from the service descriptor list only when the circuit has opened and we see that we have already enough intro points, it is then removed. But it is possible that the service establishes 3 intro points successfully before the other(s) have even opened yet. This lead to the service encoding extra intro points in the descriptor even though the circuit is not opened or might never establish (#31561). Fixes #31548 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-04tls: Log TLS read buffer length bugs onceteor
Rather than filling the logs with similar warnings. Fixes bug 31939; bugfix on 0.3.0.4-rc.
2019-10-02Merge branch 'maint-0.3.5' into maint-0.4.0Nick Mathewson
2019-10-02Merge branch 'maint-0.2.9' into maint-0.3.5Nick Mathewson
2019-10-02Update geoip and geoip6 to the October 1 2019 database.Karsten Loesing
2019-09-23Fix bug when %including folder with comment only files. #31408Daniel Pinto
When processing a %included folder, a bug caused the pointer to the last element of the options list to be set to NULL when processing a file with only comments or whitepace. This could cause options from other files on the same folder to be discarded depending on the lines after the affected %include.
2019-09-18Merge branch 'bug31466_029' into bug31466_035_tmpNick Mathewson
2019-09-18Add a rate-limit to our warning about the disabled .exit notationNick Mathewson
This warning would previously be given every time we tried to open a connection to a foo.exit address, which could potentially be used to flood the logs. Now, we don't allow this warning to appear more than once every 15 minutes. Fixes bug 31466; bugfix on 0.2.2.1-alpha, when .exit was first deprecated.
2019-09-18Avoid a crash if our "current" and "old" ntor onion keys are equalNick Mathewson
Our dimap code asserts if you try to add the same key twice; this can't happen if everything is running smoothly, but it's possible if you try to start a relay where secret_onion_key_ntor is the same as secret_onion_key_ntor.old. Fixes bug 30916; bugfix on 0.2.4.8-alpha when ntor keys were introduced.
2019-09-18Extract expressions in construct_ntor_key_map()Nick Mathewson
No behavioral change here: this is just refactoring.
2019-09-17Merge branch 'maint-0.3.5' into maint-0.4.0Nick Mathewson
2019-09-17Merge remote-tracking branch 'tor-github/pr/1300' into maint-0.3.5Nick Mathewson
2019-09-17Merge branch 'maint-0.3.5' into maint-0.4.0Nick Mathewson
2019-09-17Merge remote-tracking branch 'tor-github/pr/1307' into maint-0.3.5Nick Mathewson
2019-09-17Treat an unexpected constant-sized VERSIONS cell as a PROTOCOL_WARN.Nick Mathewson
We previously used tor_fragile_assert() to declare that this case could not happen: VERSIONS cells are always supposed to be variable-sized, right? This is incorrect, though. On a v1 link protocol connection, all cells are fixed-sized. There aren't supposed to be any VERSIONS cells with this version of the protocol, but apparently, somebody was messing up. (The v1 link protocol is obsolete, so probably the implementer responsible didn't mean to be using it.) Fixes bug 31107. Bugfix on 0.2.4.4-alpha, when we introduced a tor_fragile_assert() for this case.
2019-09-12Ticket 31687: fix for tor_isinf() as wellNick Mathewson
tor_isinf() was new in 0.4.0, and also needs to look at the same rules as clamp_double_to_i64()
2019-09-12Merge branch 'ticket31687_035' into ticket31687_040Nick Mathewson
2019-09-10pf: when extracting an IPv6 address, make sure we got an IPv6 addressNick Mathewson
Our code assumes that when we're configured to get IPv6 addresses out of a TRANS_PF transparent proxy connection, we actually will. But we didn't check that, and so FreeBSD started warning us about a potential NULL pointer dereference. Fixes part of bug 31687; bugfix on 0.2.3.4-alpha when this code was added.
2019-09-10fp.c: Suppress float-conversion warnings on FreeBSD.Nick Mathewson
We used to do this on Windows only, but it appears to affect multiple platforms when building with certain versions of GCC, and a common pattern for defining the floating-point classifier functions. Fixes part of 31687. I'm calling this a bugfux on 31687, when we started suppressing these warnings on Windows.
2019-09-09build: The <sys/sysctl.h> is now deprecated on LinuxDavid Goulet
Closes #31673
2019-09-09build: The <sys/sysctl.h> is now deprecated on LinuxDavid Goulet
Closes #31673