aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-09-14Merge branch 'bug911'Nick Mathewson
2010-09-14Tweak some issues found by arma in bug911 review.Nick Mathewson
2010-09-14Merge remote branch 'sebastian/bug1776_v3'Nick Mathewson
2010-09-13Make circuit_resume_edge_reading_helper treat streams more fairly.Nick Mathewson
Previously[*], the function would start with the first stream on the circuit, and let it package as many cells as it wanted before proceeding to the next stream in turn. If a circuit had many live streams that all wanted to package data, the oldest would get preference, and the newest would get ignored. Now, we figure out how many cells we're willing to send per stream, and try to allocate them fairly. Roger diagnosed this in the comments for bug 1298. [*] This bug has existed since before the first-ever public release of Tor. It was added by r152 of Tor on 26 Jan 2003, which was the first commit to implement streams (then called "topics"). This is not the oldest bug to be fixed in 0.2.2.x: that honor goes to the windowing bug in r54, which got fixed in e50b7768 by Roger with diagnosis by Karsten. This is, however, the most long-lived bug to be fixed in 0.2.2.x: the r54 bug was fixed 2580 days after it was introduced, whereas I am writing this commit message 2787 days after r152.
2010-09-13Add a max_cells arg to connection_edge_process_raw_inbufNick Mathewson
I'm going to use this to implement more fairness in circuit_resume_edge_reading_helper in an attempt to fix bug 1298. (Updated with fixes from arma and Sebastian)
2010-09-13Fix function declaration linebreaks at start of relay.cNick Mathewson
2010-09-13Merge remote branch 'public/pretty-signature-log'Nick Mathewson
2010-09-13Merge remote branch 'sebastian/bug1525'Nick Mathewson
2010-09-12Merge branch 'bug1138'Nick Mathewson
2010-09-12Make authorities download consensuses if appropriateNick Mathewson
An authority should never download a consensus if it has a live one, but when it doesn't, it should admit that it's not going to get one, and see if anybody else can give it one. Fixes 1300, fix on 0.2.0.9-alpha
2010-09-12Clean up a couple more bug1138 issues mentioned by roger on code reviewNick Mathewson
2010-09-12Handle null conn->requested_resource rather than assertRobert Hogan
Per arma's comments in bug1138
2010-09-12fix regression introduced by 1a65bdd2Roger Dingledine
noticed while reviewing hoganrobert/bug1138
2010-09-09Update to the latest tinytest versionNick Mathewson
This cleans up some whitespace consistency issues and, more importantly, gives you the ability to skip tests from the command line.
2010-09-08Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
2010-09-08Merge remote branch 'karsten/geoip-sep2010' into maint-0.2.1Nick Mathewson
2010-09-08be more consistent in using streamid_tNick Mathewson
2010-09-08Merge branch 'bug1653'Nick Mathewson
2010-09-08Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
2010-09-08Remove a needless keep_open_until_flushedNick Mathewson
2010-09-08Update to the September 1 2010 Maxmind GeoLite Country database.Karsten Loesing
2010-09-06Merge remote branch 'public/win_unicode_fixes'Nick Mathewson
2010-09-03Close a non-open OR connection *only* after KeepalivePeriod.Nick Mathewson
When we introduced the code to close non-open OR connections after KeepalivePeriod had passed, we replaced some code that said if (!connection_is_open(conn)) { /* let it keep handshaking forever */ } else if (do other tests here) { ... with new code that said if (!connection_is_open(conn) && past_keepalive) { /* let it keep handshaking forever */ } else if (do other tests here) { ... This was a mistake, since it made all the other tests start applying to non-open connections, thus causing bug 1840, where non-open connections get closed way early. Fixes bug 1840. Bugfix on 0.2.1.26 (commit 67b38d50).
2010-09-03Fix a missing stream_id argument; found by "tracktor"Nick Mathewson
2010-09-02Nick points out:Robert Hogan
tor_assert(!conn->_base.purpose == DIR_PURPOSE_FETCH_EXTRAINFO) != tor_assert(conn->_base.purpose != DIR_PURPOSE_FETCH_EXTRAINFO) !!
2010-09-02Amend per Sebastian's comments:Robert Hogan
- Move checks for extra_info to callers - Change argument name from failed to descs - Use strlen("fp/") instead of a magic number - I passed on the suggestion to rename functions from *_failed() to *_handle_failure(). There are a lot of these so for now just follow the house style.
2010-09-02Complicate the rules on WARN vs INFO in consensus verificationNick Mathewson
It's normal when bootstrapping to have a lot of different certs missing, so we don't want missing certs to make us warn... unless the certs we're missing are ones that we've tried to fetch a couple of times and failed at. May fix bug 1145.
2010-09-02Fix behavior of adding a cell to a blocked queue.Nick Mathewson
We frequently add cells to stream-blocked queues for valid reasons that don't mean we need to block streams. The most obvious reason is if the cell arrives over a circuit rather than from an edge: we don't block circuits, no matter how full queues get. The next most obvious reason is that we allow CONNECTED cells from a newly created stream to get delivered just fine. This patch changes the behavior so that we only iterate over the streams on a circuit when the cell in question came from a stream, and we only block the stream that generated the cell, so that other streams can still get their CONNECTEDs in.
2010-08-31Merge branch 'ratelim'Nick Mathewson
2010-08-31Fix some issues in rate-limiting noticed by SebastianNick Mathewson
2010-08-22Fix a compile warning on OpenBSDSebastian Hahn
2010-08-20Allow clients to use relays as bridgesSebastian Hahn
2010-08-20Make the windows build succeed with or without -DUNICODE enabled.Nick Mathewson
This should keep WinCE working (unicode always-on) and get Win98 working again (unicode never-on). There are two places where we explicitly use ASCII-only APIs, still: in ntmain.c and in the unit tests. This patch also fixes a bug in windoes tor_listdir that would cause the first file to be listed an arbitrary number of times that was also introduced with WinCE support. Should fix bug 1797.
2010-08-20Add unit test for tor_listdir.Nick Mathewson
2010-08-20Merge commit 'sebastian/bug1843'Nick Mathewson
2010-08-20Warn for bad combination of cookie optionsSebastian Hahn
Setting CookieAuthFileGroupReadable but without setting CookieAuthFile makes no sense, because unix directory permissions for the data directory prevent the group from accessing the file anyways.
2010-08-19Bump version to 0.2.2.15-alpha-devNick Mathewson
2010-08-19Fix up compilation on windows.Nick Mathewson
2010-08-19Make the "2 unknown, 7 missing key..." messages easier to understandNick Mathewson
This patch should fix the cases we care about for bugs 1290 and 1145. "30-56-99 are correct. Limited 4 and 8 are missing".
2010-08-18bump to 0.2.2.15-alphaRoger Dingledine
2010-08-18delay geoip stats even more for relays-turned-bridgesRoger Dingledine
2010-08-18Add a generic rate-limited log mechanism, and use it in a few placesNick Mathewson
Incidentally fixes bug 1042.
2010-08-18Detect if we try to put a cell onto a supposedly blocked cell queue.Nick Mathewson
When this happens, run through the streams on the circuit and make sure they're all blocked. If some aren't, that's a bug: block them all and log it! If they all are, where did the cell come from? Log it! (I suspect that this actually happens pretty frequently, so I'm making these log messages appear at INFO.)
2010-08-18Decide whether to ignore SENDMEs based on streams_blocked, not queue sizeNick Mathewson
2010-08-18Avoid over-filling cell queues when we receive a SENDMEyetonetime
Do not start reading on exit streams when we get a SENDME unless we have space in the appropriate circuit's cell queue. Draft fix for bug 1653. (commit message by nickm)
2010-08-18Merge commit 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/or/reasons.c
2010-08-18Move code for launching tests out of router_add_to_routerlist()Nick Mathewson
router_add_to_routerlist() is supposed to be a nice minimal function that only touches the routerlist structures, but it included a call to dirserv_single_reachability_test(). We have a function that gets called _after_ adding descriptors successfully: routerlist_descriptors_added. This patch moves the responsibility for testing there. Because the decision of whether to test or not depends on whether there was an old routerinfo for this router or not, we have to first detect whether we _will_ want to run the tests if the router is added. We make this the job of routers_update_status_from_consensus_networkstatus(). Finally, this patch makes the code notice if a router is going from hibernating to non-hibernating, and if so causes a reachability test to get launched.
2010-08-18Allow some skew in checking when a router said it was hibernatingNick Mathewson
This solves the problem Roger noted as: What if the router has a clock that's 5 minutes off, so it publishes a descriptor for 5 minutes in the future, and we test it three minutes in. In this edge case, we will continue to advertise it as Running for the full 45 minute period.
2010-08-18Clarify AssumeReachable semantics wrt hibernationNick Mathewson
2010-08-18Add some braces to make arma happyNick Mathewson