summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-06-13Add rate-limited log message to bug5263 fixNick Mathewson
Initially I said, "I claim that we shouldn't be reading and marked; let's see if I'm right." But Rob finds that it does.
2012-06-13Fix busy Libevent loops (infinite loops in Shadow)Rob G. Jansen
There is a bug causing busy loops in Libevent and infinite loops in the Shadow simulator. A connection that is marked for close, wants to flush, is held open to flush, but is rate limited (the token bucket is empty) triggers the bug. This commit fixes the bug. Details are below. This currently happens on read and write callbacks when the active socket is marked for close. In this case, Tor doesn't actually try to complete the read or write (it returns from those methods when marked), but instead tries to clear the connection with conn_close_if_marked(). Tor will not close a marked connection that contains data: it must be flushed first. The bug occurs when this flush operation on the marked connection can not occur because the connection is rate-limited (its write token bucket is empty). The fix is to detect when rate limiting is preventing a marked connection from properly flushing. In this case, it should be flagged as read/write_blocked_on_bandwidth and the read/write events de-registered from Libevent. When the token bucket gets refilled, it will check the associated read/write_blocked_on_bandwidth flag, and add the read/write event back to Libevent, which will cause it to fire. This time, it will be properly flushed and closed. The reason that both read and write events are both de-registered when the marked connection can not flush is because both result in the same behavior. Both read/write events on marked connections will never again do any actual reads/writes, and are only useful to trigger the flush and close the connection. By setting the associated read/write_blocked_on_bandwidth flag, we ensure that the event will get added back to Libevent, properly flushed, and closed. Why is this important? Every Shadow event occurs at a discrete time instant. If Tor does not properly deregister Libevent events that fire but result in Tor essentially doing nothing, Libevent will repeatedly fire the event. In Shadow this means infinite loop, outside of Shadow this means wasted CPU cycles.
2012-06-11Merge branch 'bug5452'Nick Mathewson
2012-06-11Make RECOMMENDED_MIN_CIRCUIT_BUILD_TIMEOUT warning tell the user how to fix it.Andrea Shepard
2012-06-11Merge remote-tracking branch 'public/bug4592'Nick Mathewson
2012-06-11Merge remote-tracking branch 'public/bug5598'Nick Mathewson
Conflicts: doc/tor.1.txt Conflict was on a formatting issue in the manpage.
2012-06-11Merge branch 'bug6097'Nick Mathewson
2012-06-08Warn if the user has set CircuitBuildTimeout stupidly low and turned off ↵Andrea Shepard
LearnCircuitBuildTimeout
2012-06-08changes file and whitespace fix for bug5235 patchNick Mathewson
2012-06-08Rate-limit 'Weighted bandwidth is 0.000000 ...' message; it can be produced ↵Andrea Shepard
in extreme quantities
2012-06-07typo noticed by "_raptor"Roger Dingledine
2012-06-07Merge remote-tracking branch 'arma/bug3886'Nick Mathewson
Conflicts: src/or/dirserv.c
2012-06-07Fix mingw build with -DUNICODE -D_UNICODENick Mathewson
This is a very blunt fix, and mostly just turns some func() calls into FuncA() to make things build again. Fixes bug 6097.
2012-06-07Be more careful calling wcstombsNick Mathewson
The function is not guaranteed to NUL-terminate its output. It *is*, however, guaranteed not to generate more than two bytes per multibyte character (plus terminating nul), so the general approach I'm taking is to try to allocate enough space, AND to manually add a NUL at the end of each buffer just in case I screwed up the "enough space" thing. Fixes bug 5909.
2012-06-07Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2012-06-07Send a CRLF at the end of a STATUS_* event, not in the middle of itRobert Ransom
Fixes bug 6094; bugfix on commit 3a9351b57e528b1d0bd2e72bcf78db7c91b2ff8f.
2012-06-06Change the default for DynamicDHGroups to 0Nick Mathewson
This feature can make Tor relays less identifiable by their use of the mod_ssl DH group, but at the cost of some usability (#4721) and bridge tracing (#6087) regressions. We should try to turn this on by default again if we find that the mod_ssl group is uncommon and/or we move to a different DH group size (see #6088). Before we can do so, we need a fix for bugs #6087 and Resolves ticket #5598 for now.
2012-06-05bump to 0.2.3.16-alpha-devRoger Dingledine
2012-06-05today is the day for 0.2.3.16-alphaRoger Dingledine
2012-06-05Merge branch 'bug5603'Nick Mathewson
2012-06-05Minor changes to bug5603Nick Mathewson
* Minor stylistic changes to comments and doxygen * Use strcmp_opt; it already exists. * Tighten bridge_has_digest implementation a little.
2012-06-05Merge remote-tracking branch 'public/getfilesize_64'Nick Mathewson
Conflicts: src/common/compat.c The getfilesize change conflicted with the removal of file_handle from the windows tor_mmap_t.
2012-06-05Fix some mingw build warningsNick Mathewson
These include: - Having a weird in_addr that can't be initialized with {0} - Needing INVALID_HANDLE_VALUE instead of -1 for file handles. - Having a weird dependent definition for struct stat. - pid is signed, not unsigned.
2012-06-05Revert "Disable (Cell,DirReq,Entry,ExitPort)Statistics on bridges"Nick Mathewson
This reverts commit 981e896dd2eaf69798bb503c271306ee779dd6d2. Apparently Karsten still needs DirReqStatistics for bridges; see
2012-06-05Downgrade tor_assert(0) to tor_fragile_assert() in windows stub ↵Nick Mathewson
create_unix_sockaddr
2012-06-05Merge remote-tracking branch 'public/bug3894'Nick Mathewson
2012-06-05Merge remote-tracking branch 'public/format_doubles'Nick Mathewson
Conflicts: src/or/geoip.c
2012-06-05Disable (Cell,DirReq,Entry,ExitPort)Statistics on bridgesNick Mathewson
These stats are currently discarded, but we might as well hard-disable them on bridges, to be clean. Fix for bug 5824; bugfix on 0.2.1.17-rc. Patch originally by Karsten Loesing.
2012-06-05Merge remote-tracking branch 'public/bug4657'Nick Mathewson
Conflicts: src/or/router.c
2012-06-05Merge remote-tracking branch 'public/bug4710'Nick Mathewson
2012-06-05Fix "make check-spaces" issuesNick Mathewson
2012-06-05Resolve about 24 DOCDOCsNick Mathewson
2012-06-04Missing copyright/license statement for procmon.cNick Mathewson
2012-06-04Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson
2012-06-04Add about 60 more DOCDOC comments to 0.2.3Nick Mathewson
Also, try to resolve some doxygen issues. First, define a magic "This is doxygen!" macro so that we take the correct branch in various #if/#else/#endifs in order to get the right documentation. Second, add in a few grouping @{ and @} entries in order to get some variables and fields to get grouped together.
2012-06-04Resolve some markup complaints from doxygenNick Mathewson
2012-06-04Resolve all currently pending DOCDOC items in masterNick Mathewson
2012-06-04Merge origin/maint-0.2.2 for 6007_strictNick Mathewson
This code shouldn't have any effect in 0.2.3, since we already accept (and handle) data received while we are expecting a renegotiation. (That's because the 0.2.3.x handshake _does_ have data there instead of the renegotiation.) I'm leaving it in anyway, since if it breaks anything, we'll want it broken in master too so we can find out about it. I added an XXX023 comment so that we can come back later and fix that.
2012-06-04Merge remote-tracking branch 'public/bug6007_strict_squashed' into maint-0.2.2Nick Mathewson
2012-06-04Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2012-06-04Merge remote-tracking branch 'public/bug6033' into maint-0.2.2Nick Mathewson
2012-06-04Kill non-open OR connections with any data on their inbufs.Nick Mathewson
This fixes a DoS issue where a client could send so much data in 5 minutes that they exhausted the server's RAM. Fix for bug 5934 and 6007. Bugfix on 0.2.0.20-rc, which enabled the v2 handshake.
2012-06-04Fix build warning on Lenny about strtok_r unit testNick Mathewson
This fixes a warning in efb8a09f, where Debain Lenny's GCC doesn't get that for (i=0; i<3; ++i) { const char *p; switch(i) { case 0: p="X"; break; case 1: p="Y"; break; case 2: p="Z"; break; } printf("%s\n", p); } will never try to print an uninitialezed value. Found by buildbots. Bug in no released versions of Tor.
2012-06-02Work around a bug in OpenSSL 1.0.1's TLS 1.1 and TLS 1.2 supportNick Mathewson
It appears that when OpenSSL negotiates a 1.1 or 1.2 connection, and it decides to renegotiate, the client will send a record with version "1.0" rather than with the current TLS version. This would cause the connection to fail whenever both sides had OpenSSL 1.0.1, and the v2 Tor handshake was in use. As a workaround, disable TLS 1.1 and TLS 1.2. When a later version of OpenSSL is released, we can make this conditional on running a fixed version of OpenSSL. Alternatively, we could disable TLS 1.1 and TLS 1.2 only on the client side. But doing it this way for now means that we not only fix TLS with patched clients; we also fix TLS when the server has this patch and the client does not. That could be important to keep the network running well. Fixes bug 6033.
2012-06-03Improve conflict resolution when adding new bridges.George Kadianakis
2012-05-31Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2012-05-31Make all begindir or one-hop circuits internalNick Mathewson
This solves bug 5283, where client traffic could get sent over the same circuit as an anonymized connection to a directory, even if that circuit used an exit node unsuitable for clients. By marking the directory connection as needs_internal, we ensure that the (non-internal!) client-traffic connection won't be sent over the same circuit.
2012-05-31Merge remote-tracking branch 'public/bug5089'Nick Mathewson
Conflicts: src/test/test_util.c Merge the unit tests; I added some when I did this branch against 0.2.2, and then the test format changed and master added more tests.
2012-05-31A few more get_parent_directory tests.Nick Mathewson
2012-05-31Merge remote-tracking branch 'public/bug5374'Nick Mathewson