summaryrefslogtreecommitdiff
path: root/src/or/relay.c
AgeCommit message (Collapse)Author
2010-07-27Create control.hSebastian Hahn
2010-07-27Create connection_or.hSebastian Hahn
2010-07-27Create connection_edge.hSebastian Hahn
2010-07-27Create connection.hSebastian Hahn
2010-07-27Create config.hSebastian Hahn
2010-07-27Create circuitlist.hSebastian Hahn
2010-07-27Create circuitbuild.hSebastian Hahn
2010-07-27Create buffers.hSebastian Hahn
2010-07-27Create rendcommon.hSebastian Hahn
2010-07-27Create routerlist.hSebastian Hahn
2010-07-27Create geoip.hSebastian Hahn
2010-04-13Rename CircPriorityHalflifeMsec to CircuitPriorityHalflifeMsecNick Mathewson
Everything that accepted the 'Circ' name handled it wrong, so even now that we fixed the handling of the parameter, we wouldn't be able to set it without making all the 0.2.2.7..0.2.2.10 relays act wonky. This patch makes Tors accept the 'Circuit' name instead, so we can turn on circuit priorities without confusing the versions that treated the 'Circ' name as occasion to act weird.
2010-04-12Fix a bug in reading CircPriorityHalflife from consensusNick Mathewson
When you mean (a=b(c,d)) >= 0, you had better not say (a=b(c,d)>=0). We did the latter, and so whenever CircPriorityHalflife was in the consensus, it was treated as having a value of 1 msec (that is, boolean true).
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2010-02-27Update Tor Project copyright yearsNick Mathewson
2009-12-15Change interface for configuring cell ewma algorithm.Nick Mathewson
The rule is now: take the value from the CircuitPriorityHalflife config option if it is set. If it zero, disable the cell_ewma algorithm. If it is set, use it to calculate the scaling factor. If it is not set, look for a CircPriorityHalflifeMsec parameter in the consensus networkstatus. If *that* is zero, then disable the cell_ewma algorithm; if it is set, use it to calculate the scaling factor. If it is not set at all, disable the algorithm.
2009-12-15Merge commit 'sebastian/ewma2' into ewmaNick Mathewson
Conflicts: src/or/relay.c
2009-12-15Fix various comment typos in ewma patch; found by arma.Nick Mathewson
2009-12-14Fix Snow Leopard compile and a codestyle violationSebastian Hahn
When calculating the current tick, cap (tv_sec / EWMA_TICK_LEN) to an unsigned int.
2009-12-13Optimize cell-ewma circuit priority algorithm.Nick Mathewson
There are two big changes here: - We store active circuits in a priority queue for each or_conn, rather than doing a linear search over all the active circuits before we send each cell. - Rather than multiplying every circuit's cell-ewma by a decay factor every time we send a cell (thus normalizing the value of a current cell to 1.0 and a past cell to alpha^t), we instead only scale down the cell-ewma every tick (ten seconds atm), normalizing so that a cell sent at the start of the tick has value 1.0).
2009-12-12Adjust EWMA patch to conform to whitespace style.Nick Mathewson
2009-12-12Favor quiet circuits when choosing which order to relay cells in.Can Tang
Each circuit is ranked in terms of how many cells from it have been relayed recently, using a time-weighted average. This patch has been tested this on a private Tor network on PlanetLab, and gotten improvements of 12-35% in time it takes to fetch a small web page while there's a simultaneous large data transfer going on simultaneously. [Commit msg by nickm based on mail from Ian Goldberg.]
2009-12-12*_free functions now accept NULLSebastian Hahn
Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary.
2009-11-22add a minimum for CircuitStreamTimeout, plus a man pageRoger Dingledine
plus some other unrelated touchups that have been sitting in my sandbox
2009-10-26clean up the XXX comments around bug 1038Roger Dingledine
2009-09-01Fix compile warnings on Snow LeopardSebastian Hahn
Big thanks to nickm and arma for helping me with this!
2009-08-21Add some fixes after discussion with Nick.Karsten Loesing
- Refactor geoip.c by moving duplicate code into rotate_request_period(). - Don't leak memory when cleaning up cell queues. - Make sure that exit_(streams|bytes_(read|written)) are initialized in all places accessing these arrays. - Read only the last block from *stats files and ensure that its timestamp is not more than 25 hours in the past and not more than 1 hour in the future. - Stop truncating the last character when reading *stats files. The only thing that's left now is to avoid reading whole *stats files into memory.
2009-08-18Clean up proposal 166 and its implementation.Karsten Loesing
2009-08-17Use memory pool for insertion times.Karsten Loesing
2009-08-17Implement queue with O(1) operations, and correct some math.Karsten Loesing
2009-08-17Reduce cell statistics accuracy from 1 ms to 10 ms.Karsten Loesing
2009-08-17Remove ./configure option for cell statistics.Karsten Loesing
2009-08-17Remove ./configure option for entry and dir request statistics.Karsten Loesing
2009-08-10Merge branch 'maint-0.2.1'Roger Dingledine
2009-08-10Send sendmes when we're down 100 cells, not 101.Roger Dingledine
Send circuit or stream sendme cells when our window has decreased by 100 cells, not when it has decreased by 101 cells. Bug uncovered by Karsten when testing the "reduce circuit window" performance patch. Bugfix on the 54th commit on Tor -- from July 2002, before the release of Tor 0.0.0. This is the new winner of the oldest-bug prize.
2009-07-28Merge branch 'maint-0.2.1' into masterRoger Dingledine
2009-07-27three hacks to workaround bug 1038Roger Dingledine
The problem is that clients and hidden services are receiving relay_early cells, and they tear down the circuit. Hack #1 is for rendezvous points to rewrite relay_early cells to relay cells. That way there are never any incoming relay_early cells. Hack #2 is for clients and hidden services to never send a relay_early cell on an established rendezvous circuit. That works around rendezvous points that haven't upgraded yet. Hack #3 is for clients and hidden services to not tear down the circuit when they receive an inbound relay_early cell. We already refuse extend cells at clients.
2009-07-27Fix dirreq and cell stats on 32-bit architectures.Karsten Loesing
When determining how long directory requests take or how long cells spend in queues, we were comparing timestamps on microsecond detail only to convert results to second or millisecond detail later on. But on 32-bit architectures this means that 2^31 microseconds only cover time differences of up to 36 minutes. Instead, compare timestamps on millisecond detail.
2009-07-15Some tweaks to statistics.Karsten Loesing
Changes to directory request statistics: - Rename GEOIP statistics to DIRREQ statistics, because they now include more than only GeoIP-based statistics, whereas other statistics are GeoIP-dependent, too. - Rename output file from geoip-stats to dirreq-stats. - Add new config option DirReqStatistics that is required to measure directory request statistics. - Clean up ChangeLog. Also ensure that entry guards statistics have access to a local GeoIP database.
2009-07-15Some tweaks to directory request download times.Karsten Loesing
- Use common prefixes DIRREQ_* and dirreq_*. - Replace enums in structs with bitfields.
2009-07-15Directories now also measure download times of network statuses.Karsten Loesing
2009-07-13fix comments and other typosRoger Dingledine
2009-07-05If configured, write cell statistics to disk periodically.Karsten Loesing
2009-06-16Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-06-16Revise earlier check for correct IPv4 addr length to check for ==4.Nick Mathewson
We need this to match the check in connection_ap_handshake_socks_resolved(). Found by optimist.
2009-06-12Check answer_len in the remap_addr case of process_relay_cell_not_open.Roger Dingledine
Fix an edge case where a malicious exit relay could convince a controller that the client's DNS question resolves to an internal IP address. Bug found and fixed by "optimist"; bugfix on 0.1.2.8-beta.
2009-06-12Check answer_len in the remap_addr case of process_relay_cell_not_open.Roger Dingledine
Fix an edge case where a malicious exit relay could convince a controller that the client's DNS question resolves to an internal IP address. Bug found and fixed by "optimist"; bugfix on 0.1.2.8-beta.
2009-05-28Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-05-28Two more spelling fix fixes.Nick Mathewson
2009-05-27Merge commit 'origin/maint-0.2.1'Nick Mathewson