Nick Mathewson
98ec959c9c
Fix a couple of bufferevent incompatibilities that snuck in.
2010-09-27 14:22:18 -04:00
Nick Mathewson
0c9b64d449
Get zlib compression working with bufferevents.
2010-09-27 14:22:11 -04:00
Nick Mathewson
9796b9bfa6
Implement SOCKS-client support for bufferevents
2010-09-27 12:31:14 -04:00
Nick Mathewson
c74a4ab515
Documentation for a few bufferevent functions.
2010-09-27 12:31:14 -04:00
Nick Mathewson
bd3612cd2b
Get SSL connections and linked connections working with bufferevents.
...
Clients are now verified to work and build circuits correctly. There
are still a few warnings given here and there that I need to look into.
2010-09-27 12:31:14 -04:00
Nick Mathewson
fc4ddafab8
Make control connections use bufferevents
2010-09-27 12:31:14 -04:00
Nick Mathewson
84bb5d573c
Fix crash/warning bug when we get an unexpected close.
...
This was possible if we have already decided to close a bufferevent
connection, but the other side decides to close it first.
2010-09-27 12:31:13 -04:00
Nick Mathewson
4af6887d20
Add support for linked connections with bufferevent_pair.
...
Also, set directory connections (linked and otherwise) to use bufferevents.
Also, stop using outbuf_flushlen anywhere except for OR connections.
2010-09-27 12:31:13 -04:00
Nick Mathewson
b63f6518cb
Add bufferevent support for outgoing connections; exits are now supported.
2010-09-27 12:31:13 -04:00
Nick Mathewson
ddcb59bb70
Fix more remaining users of inbuf/outbuf to handle bufferevents instead.
2010-09-27 12:31:13 -04:00
Nick Mathewson
5279036148
Be a little more abstract about which connection type use bufferevents
2010-09-27 12:31:13 -04:00
Nick Mathewson
9f8027abfd
Make a function to mark a connection and set hold_open_until_flushed.
2010-09-27 12:31:13 -04:00
Nick Mathewson
d830eb366a
Allow hold-open-until-flushed logic to work for bufferevents.
2010-09-27 12:29:43 -04:00
Nick Mathewson
ec10c044fb
Move the "stop writing when the buffer is empty" logic to cnnection_finished_flushing
2010-09-27 12:29:43 -04:00
Nick Mathewson
c6e22ae2b7
Basic bufferevent callbacks
...
These are based strongly on connection_handle_read and
connection_handle_write, but hopefully without so much mixture of IO
logic and Tor logic.
2010-09-27 12:29:42 -04:00
Nick Mathewson
0514917800
Add a new connection_fetch_from_buf_line() that can handle bufferevents
2010-09-27 12:28:43 -04:00
Nick Mathewson
5448501479
New bufferevent-related check in assert_connection_ok().
...
{Make sure that if we have a bufferevent on a connection, we do not have the
other libevent/buffering-related fields set.}
2010-09-27 12:28:43 -04:00
Nick Mathewson
076025476a
Add bufferevent versions of connection_write/fetch_to/from_buf.
2010-09-27 12:28:43 -04:00
Nick Mathewson
200921dc31
Refactor users of buf_datalen to bufferevent-friendly version.
2010-09-27 12:28:43 -04:00
Nick Mathewson
57e7b54b7b
Teach read_event/write_event manipulators about bufferevents.
...
Add an --enable-bufferevents config switch.
2010-09-27 12:28:43 -04:00
Nick Mathewson
ba9c1275c4
Add a generic rate-limited log mechanism, and use it in a few places
...
Incidentally fixes bug 1042.
2010-08-18 15:55:49 -04:00
Nick Mathewson
a509dbba50
Merge commit 'karsten/dirbytes2'
...
Conflicts:
src/or/rephist.h
2010-08-18 10:06:14 -04:00
Karsten Loesing
58b6195455
Correctly report written bytes on linked connections.
2010-08-18 13:54:41 +02:00
Karsten Loesing
db94b7f46e
Count bytes we spend on answering directory requests.
2010-08-18 13:54:41 +02:00
Nick Mathewson
a856f446c7
Merge commit 'sebastian/bug1831'
2010-08-15 23:43:36 -04:00
Sebastian Hahn
561ca9b987
Fix misplaced labels
2010-08-16 00:46:44 +02:00
Karsten Loesing
acd25558b8
Refactor exit port statistics code and add unit tests.
2010-08-11 16:19:54 +02:00
Sebastian Hahn
05072723cb
Create routerparse.h
2010-07-27 10:00:46 +02:00
Sebastian Hahn
df9d42cef5
Create rephist.h
2010-07-27 10:00:46 +02:00
Sebastian Hahn
b0cd4551ab
Create relay.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
cc060ea220
Create reasons.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
7bd8dee463
Create policies.h
2010-07-27 10:00:45 +02:00
Sebastian Hahn
0f1548ab18
Create main.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
dc2f1666ff
Create dns.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
7d4c027fb0
Create dirserv.h
2010-07-27 07:58:16 +02:00
Sebastian Hahn
bec1c838ca
Create directory.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
98d1314c7e
Create cpuworker.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
0bfa34e1f6
Create control.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
0d33120c26
Create connection_or.h
2010-07-27 07:58:15 +02:00
Sebastian Hahn
78b6a4650b
Create connection_edge.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
2a74101f7a
Create connection.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
c4f8f1316e
Create config.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
01c7b60a80
Create circuituse.h
2010-07-27 07:58:14 +02:00
Sebastian Hahn
174a88dd79
Create circuitlist.h
2010-07-27 07:58:13 +02:00
Sebastian Hahn
21155204c6
Create circuitbuild.h
2010-07-27 07:58:13 +02:00
Sebastian Hahn
34dfce0d82
Create buffers.h
2010-07-27 07:56:26 +02:00
Sebastian Hahn
7caa8351b8
Create rendclient.h
2010-07-27 07:56:26 +02:00
Sebastian Hahn
31e81439e1
Create rendcommon.h
2010-07-27 07:56:25 +02:00
Sebastian Hahn
c53b6cc831
Create router.h
2010-07-27 07:56:25 +02:00
Sebastian Hahn
ff4030f621
Create geoip.h
2010-07-27 07:56:25 +02:00
Sebastian Hahn
e69dc22f4e
Split headers for dnsserv.c functions out of or.h
...
The next series of commits begins addressing the issue that we're
currently including the complete or.h file in all of our source files.
To change that, we're splitting function definitions into new header
files (one header file per source file).
2010-07-27 07:56:25 +02:00
Roger Dingledine
625963d92a
commit my annotations while i was hunting down the host order bug
2010-03-05 16:04:01 -05:00
Nick Mathewson
b006e3279f
Merge remote branch 'origin/maint-0.2.1'
...
Conflicts:
src/common/test.h
src/or/test.c
2010-02-27 17:16:31 -05:00
Nick Mathewson
c3e63483b2
Update Tor Project copyright years
2010-02-27 17:14:21 -05:00
Sebastian Hahn
b2b99a70c0
Don't spam controllers with TOO_MANY_CONNECTIONS events
...
We implemented ratelimiting for warnings going into the logfile, but didn't
rate-limit controller events. Now both log warnings and controller events
are rate-limited.
2010-02-08 16:45:36 +01:00
Nick Mathewson
d4354b506b
Don't use OutboundBindAddress to connect to localhost
...
The OutboundBindAddress option is useful for making sure that all of
your outbond connections use a given interface. But when connecting
to 127.0.0.1 (or ::1 even) it's important to actually have the
connection come _from_ localhost, since lots of programs running on
localhost use the source address to authenticate that the connection
is really coming from the same host.
Our old code always bound to OutboundBindAddress, whether connecting
to localhost or not. This would potentially break DNS servers on
localhost, and socks proxies on localhost. This patch changes the
behavior so that we only look at OutboundBindAddress when connecting
to a non-loopback address.
2010-01-20 13:09:10 -05:00
Sebastian Hahn
c32e8c292e
Log a notice when we get a new control connection
2010-01-18 19:14:36 -05:00
Roger Dingledine
b9f1bd3c4e
whitespace fixes
2010-01-15 15:58:35 -05:00
Roger Dingledine
f255272f45
add separate per-conn write limiting
2009-12-29 22:25:02 -05:00
Nick Mathewson
05a2473b7f
Merge branch 'ewma'
2009-12-18 22:33:02 -05:00
Karsten Loesing
f80672d747
Remove duplicate words and a duplicate newline.
2009-12-18 12:55:05 +01:00
Nick Mathewson
350181529e
Merge branch 'safelogging2'
...
Conflicts:
ChangeLog
2009-12-15 17:26:09 -05:00
Nick Mathewson
fcbd65b45c
Refactor the safe_str_*() API to make more sense.
...
The new rule is: safe_str_X() means "this string is a piece of X
information; make it safe to log." safe_str() on its own means
"this string is a piece of who-knows-what; make it safe to log".
2009-12-15 17:25:34 -05:00
Nick Mathewson
06e8370c33
Optimize cell-ewma circuit priority algorithm.
...
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-13 21:05:53 -05:00
Nick Mathewson
c43fee131d
Adjust EWMA patch to conform to whitespace style.
2009-12-12 19:06:38 -05:00
Can Tang
d3be00e0f4
Favor quiet circuits when choosing which order to relay cells in.
...
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 19:06:38 -05:00
Nick Mathewson
0c1b3070cf
Now that FOO_free(NULL) always works, remove checks before calling it.
2009-12-12 02:07:59 -05:00
Sebastian Hahn
3807db001d
*_free functions now accept NULL
...
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-12-12 03:29:44 +01:00
Sebastian Hahn
f258647433
Allow SafeLogging to exclude client related information
2009-12-12 02:26:11 +01:00
Roger Dingledine
4f8b36a1e2
clobber connections with different number than we clobber circuits
2009-11-21 23:02:10 -05:00
Roger Dingledine
7b6b931ccc
stop assuming that our downcasts have a struct offset of 0
...
shouldn't actually change anything, but who knows.
2009-11-21 22:59:18 -05:00
Nick Mathewson
5e4d53d535
Remove checks for array existence. (CID 410..415)
...
In C, the code "char x[10]; if (x) {...}" always takes the true branch of
the if statement. Coverity notices this now.
In some cases, we were testing arrays to make sure that an operation
we wanted to do would suceed. Those cases are now always-true.
In some cases, we were testing arrays to see if something was _set_.
Those caes are now tests for strlen(s), or tests for
!tor_mem_is_zero(d,len).
2009-10-26 22:40:41 -04:00
Roger Dingledine
1c62b9d5fa
fix a bug where we were decrementing the wrong bucket
...
i think this doesn't actually affect anything, since linked
conns usually don't impact buckets
2009-10-10 14:52:41 -04:00
Roger Dingledine
86af2ecbda
minor fixes in some comments
2009-09-06 20:09:08 -04:00
Nick Mathewson
1d9b8a1e16
Merge commit 'karsten/proposal-166-impl-master'
2009-08-26 11:36:40 -04:00
Nick Mathewson
707a6bd659
Merge commit 'public/socks-client'
...
Resolved conflict in:
src/or/or.h
2009-08-26 11:27:19 -04:00
Nick Mathewson
903f9ef50e
Clean up a couple of style issues in the socks-client branch.
2009-08-25 10:30:54 -04:00
Karsten Loesing
4e29f33427
Write all statistics to disk exactly every 24 hours.
2009-08-19 15:41:12 +02:00
Karsten Loesing
dccadb30cd
Clean up proposal 166 and its implementation.
2009-08-18 15:53:08 +02:00
Karsten Loesing
ab7729f472
Remove ./configure option for entry and dir request statistics.
2009-08-17 13:29:50 +02:00
Karsten Loesing
8c496d1660
Some tweaks to statistics.
...
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-15 16:32:40 +02:00
Karsten Loesing
416940d93b
Some tweaks to directory request download times.
...
- Use common prefixes DIRREQ_* and dirreq_*.
- Replace enums in structs with bitfields.
2009-07-15 16:14:14 +02:00
Karsten Loesing
3c05132575
Directories now also measure download times of network statuses.
2009-07-15 16:12:45 +02:00
Karsten Loesing
4d6af73db8
If configured, write per-port exit statistics to disk periodically.
...
[Original patch series from Karsten, revised and squashed by Nick]
2009-07-02 12:37:05 -04:00
Christopher Davis
75472c19c3
Enable Tor to connect through SOCKS 4/5 proxies
...
Added a sanity check in config.c and a check in directory.c
directory_initiate_command_rend() to catch any direct connection attempts
when a socks proxy is configured.
2009-06-19 12:16:15 -04:00
Nick Mathewson
1e709c79d1
Isolate Libevent API dependency to just main.c and dns.c in src/or.
...
The rest of the code was only including event.h so that it could see
EV_READ and EV_WRITE, which we were using as part of the
connection_watch_events interface for no very good reason.
2009-06-12 14:27:53 -04:00
Nick Mathewson
cb18fc2190
Merge commit 'origin/maint-0.2.1'
2009-05-27 18:12:18 -04:00
Nick Mathewson
ec7e054668
Spell-check Tor.
2009-05-27 17:55:51 -04:00
Mike Perry
29bf271ba2
Fix misreporting of stream bandwidths.
2009-05-14 17:52:26 -04:00
potentiate
1b61c8bf37
Fix misreporting of stream bandwidths.
2009-05-14 17:50:06 -04:00
Karsten Loesing
948835c680
Remove unused rendversion parameters. YAGNI.
2009-05-04 13:46:30 -04:00
Karsten Loesing
f79688ddef
Clients do not request version 0 hidserv descs anymore.
2009-05-04 13:46:30 -04:00
Karsten Loesing
9b32e8c141
Update copyright to 2009.
2009-05-04 11:28:27 -04:00
Karsten Loesing
4ebcc4da34
Update copyright to 2009.
2009-05-02 22:00:54 +02:00
Roger Dingledine
decdf4537a
If we're using bridges and our network goes away, be more willing
...
to forgive our bridges and try again when we get an application
request. Bugfix on 0.2.0.x.
svn:r18396
2009-02-04 23:27:35 +00:00
Nick Mathewson
c4b8fef362
Remove svn $Id$s from our source, and remove tor --version --version.
...
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed. They were not actually useful for
telling the version of Tor files in the wild.
svn:r17867
2009-01-04 00:35:51 +00:00
Nick Mathewson
3a8a2cb2de
Downgrade some xxx021s, comment more on others, etc
...
svn:r17823
2008-12-29 20:17:24 +00:00
Nick Mathewson
f7fb1bf931
Refactor sockaddr family match check into a new function
...
svn:r17820
2008-12-29 19:57:17 +00:00
Nick Mathewson
ae71b52945
remove the responsibility for setting listensocklen to the function that made the sockaddr
...
svn:r17799
2008-12-27 15:46:13 +00:00
Nick Mathewson
a87335472c
Make connection_create_listener take a sockaddr_len, not just a sockaddr whose length we try to divine.
...
svn:r17792
2008-12-27 00:20:06 +00:00
Nick Mathewson
df5e8f65bc
Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).
...
svn:r17783
2008-12-26 17:35:08 +00:00
Nick Mathewson
b68379b13b
Add DOCDOC entries for undocumented static and global variables.
...
svn:r17739
2008-12-22 19:00:05 +00:00
Nick Mathewson
1e5f457461
Fix most DOCDOCs remaining and/or added by redox.
...
svn:r17734
2008-12-22 17:53:04 +00:00
Nick Mathewson
1725c0c8a5
Add DOCDOC comments for all undocumented functions. Add missing *s to other comments so that they will get recognized as doxygen.
...
svn:r17729
2008-12-22 14:56:28 +00:00
Nick Mathewson
bf80e2df3f
Replace calls to time(NULL) that occur on the order of once per read, one per write, or once per cell with calls to a function that looks at a cached value of time. This is tricksy to benchmark, since it will only help on systems where time() is a syscall and syscalls are relatively slow.
...
svn:r17690
2008-12-18 17:19:04 +00:00
Nick Mathewson
122170c1d3
Downlgrade tweak, and answer lots of XXX021s. No actual code fixes in this patch.
...
svn:r17686
2008-12-18 16:11:24 +00:00
Nick Mathewson
ecaee1d927
Remove fixed xxx020s; downgrade unfixed ones.
...
(The unfixed ones are being downgraded to regular XXXs mainly on the rationale that they don't seem to be exploding Tor, and they were apparently not showstoppers for 0.2.0.x-final.)
svn:r17682
2008-12-18 16:11:03 +00:00
Nick Mathewson
7678ac5193
Move edge-only flags from connection_t to edge_connection_t.
...
svn:r17643
2008-12-17 14:59:28 +00:00
Nick Mathewson
04ec7d1f98
Now that tor_assert is no longer using a broken force-to-boolean formulation, we can tor_assert a bitfield without a gcc compile error.
...
svn:r17598
2008-12-11 20:28:50 +00:00
Nick Mathewson
ae33d3ead7
Apply rovv's fix for bug 824.
...
svn:r16975
2008-09-26 15:30:26 +00:00
Nick Mathewson
8bc1536a9e
Add patch 4 from Karsten for proposal 121, slightly modified. Karsten should definitely re-review the bits I changed.
...
svn:r16955
2008-09-24 14:44:29 +00:00
Roger Dingledine
4fd9880540
give rend_client_desc_here a slightly more accurate name
...
svn:r16916
2008-09-16 10:26:15 +00:00
Roger Dingledine
38f2272d5d
patch from karsten for bug 814. whew.
...
svn:r16915
2008-09-16 10:17:04 +00:00
Roger Dingledine
2bde30efa6
read_to_buf should take an int *error_socket and return it.
...
svn:r16909
2008-09-14 08:35:41 +00:00
Karsten Loesing
52fbfc5d45
Correct indentation.
...
svn:r16819
2008-09-09 22:19:41 +00:00
Roger Dingledine
d37fae2f4e
Catch and report a few more bootstrapping failure cases when Tor
...
fails to establish a TCP connection. Cleanup on 0.2.1.x.
svn:r16803
2008-09-09 06:25:39 +00:00
Nick Mathewson
baeb260ad1
Refactor use of connection_new so that we get more verifiable typesafety.
...
svn:r16785
2008-09-05 22:09:44 +00:00
Nick Mathewson
3f2b7078d2
Use warn_too_many_conns() when accept() fails with a resource limit.
...
svn:r16751
2008-09-04 15:22:55 +00:00
Nick Mathewson
730f1b6d3f
Oops. Make warn_too_many_conns() actually work.
...
svn:r16686
2008-08-29 17:01:15 +00:00
Nick Mathewson
fcf817f897
Switch global_identifier on connections to a 64-bit field and move it to connection_t. When procession onionskins, look up the connection by this field rather than by addr:port. This will keep us from dropping onionskins. How many dropped circuits are dropped because of this bug?
...
svn:r16558
2008-08-15 13:55:01 +00:00
Nick Mathewson
30422b5df1
Rate-limit "too-many-sockets" messages; they can get needlessly verbose.
...
svn:r16480
2008-08-09 15:35:37 +00:00
Nick Mathewson
60a0ae198d
Patch cleanups from karsten
...
svn:r16479
2008-08-09 15:13:28 +00:00
Nick Mathewson
d9601c65e0
r17666@tombo: nickm | 2008-08-07 15:12:30 -0400
...
Make tor_addr_from_sockaddr also give away the port in a useful format
svn:r16458
2008-08-07 19:13:35 +00:00
Nick Mathewson
9855c1d06f
r17645@31-33-44: nickm | 2008-08-05 16:28:01 -0400
...
Make unspecified addresses also cause connection_is_rate_limited to say 0.
svn:r16437
2008-08-05 20:28:03 +00:00
Nick Mathewson
960a0f0a99
r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
...
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types. Most of the Tor wire formats using these new types are in, but the code to generate and use it is not. This is a big patch. Let me know what it breaks for you.
svn:r16435
2008-08-05 20:08:19 +00:00
Nick Mathewson
3ce6e2fba2
r17346@aud-055: nickm | 2008-07-24 15:37:19 +0200
...
Make generic address manipulation functions work better. Switch address policy code to use tor_addr_t, so it can handle IPv6. That is a good place to start.
svn:r16178
2008-07-24 13:44:04 +00:00
Roger Dingledine
8fa912a8c5
If we close our OR connection because there's been a circuit
...
pending on it for too long, we were telling our bootstrap status
events "REASON=NONE". Now tell them "REASON=TIMEOUT".
svn:r15369
2008-06-20 04:42:17 +00:00
Roger Dingledine
94dabd2c23
If you're using bridges, generate "bootstrap problem" warnings
...
as soon as you run out of working bridges, rather than waiting
for ten failures -- which will never happen if you have less than
ten bridges.
svn:r15368
2008-06-20 04:34:39 +00:00
Roger Dingledine
c6a94718cd
Directory authorities shouldn't complain about bootstrapping
...
problems just because they do a lot of reachability testing and
some of the connection attempts fail.
svn:r15348
2008-06-18 07:34:04 +00:00
Roger Dingledine
8c85eef9b0
start sending "bootstrap problem" status events when we're having troubles
...
reaching relays.
svn:r15116
2008-06-11 01:14:23 +00:00
Roger Dingledine
42f21007a3
consolidate all our edge/circ/orconn reason-to-foo-or-back functions
...
svn:r15115
2008-06-11 00:17:02 +00:00
Roger Dingledine
baa3cea213
Start noticing and reporting bootstrapping failures too. It looks like
...
we never bothered learning why OR conns fail, so next step is to add some
infrastructure for that.
svn:r15091
2008-06-09 18:32:43 +00:00
Roger Dingledine
5dc8062afa
what, we went from v4 to v6?
...
svn:r14428
2008-04-23 18:37:24 +00:00
Roger Dingledine
5e299b5e01
minor fixes that have been accumulating
...
svn:r14378
2008-04-16 00:12:44 +00:00
Roger Dingledine
20f927c2dd
forward-port r14373
...
svn:r14374
2008-04-15 23:06:31 +00:00
Nick Mathewson
e6b617bf05
r18872@catbus: nickm | 2008-03-16 23:56:48 -0400
...
Only dump all guard node status to the log when the guard node status actually changes. Downgrade the 4 most common remaining INFO log messages to DEBUG.
svn:r14069
2008-03-17 04:07:51 +00:00
Nick Mathewson
11e464c331
r18753@catbus: nickm | 2008-03-11 14:56:39 -0400
...
Make some assert()s into tor_assert()s. Make some tor_assert()s called from logging into assert()s, and document why.
svn:r13977
2008-03-11 18:56:41 +00:00
Nick Mathewson
eefe2a3562
r18462@catbus: nickm | 2008-02-27 14:15:57 -0500
...
Add better warnings for the error that produced bug 614, and downgrade from a tor_assert() to a tor_fragile_assert().
svn:r13752
2008-02-27 19:19:34 +00:00
Nick Mathewson
3452486ac6
r14422@tombo: nickm | 2008-02-24 17:09:56 -0500
...
Whitespace fixes
svn:r13700
2008-02-24 22:11:18 +00:00
Nick Mathewson
dde81de3dd
r14419@tombo: nickm | 2008-02-24 16:55:11 -0500
...
Patch from tup: use sizeof sockaddr_un as the size of a unix sockaddr. Fixes unix controlsocket binding on openbsd.
svn:r13697
2008-02-24 22:11:00 +00:00
Nick Mathewson
e0de72dd87
r14410@tombo: nickm | 2008-02-23 16:51:46 -0500
...
Fix the last of the -Wshorten-64-to-32 warnings.
svn:r13696
2008-02-24 22:10:08 +00:00
Nick Mathewson
e7db789e82
r14399@tombo: nickm | 2008-02-22 14:09:38 -0500
...
More 64-to-32 fixes. Partial backport candidate. still not done.
svn:r13680
2008-02-22 19:09:45 +00:00
Nick Mathewson
e68760ac0f
r14388@tombo: nickm | 2008-02-21 22:44:28 -0500
...
More 64-to-32 fixes.
svn:r13672
2008-02-22 03:44:36 +00:00
Nick Mathewson
0ba2bfeef6
r14363@31-33-219: nickm | 2008-02-21 11:11:33 -0500
...
Answer the next-to-last XXX020rc item.
svn:r13658
2008-02-21 16:12:01 +00:00
Nick Mathewson
e2f25558b9
r14362@31-33-219: nickm | 2008-02-21 11:01:10 -0500
...
Change some of our log messages related to closed TLS connections in order to better reflect reality.
svn:r13657
2008-02-21 16:11:58 +00:00
Roger Dingledine
a60f7caa54
start allowing clients to give up on trackhostexits targets if
...
five circuit attempts fail for a given stream. part of the fix
for bug 437. still an XXX020rc remaining.
svn:r13648
2008-02-21 09:00:54 +00:00
Roger Dingledine
b28a342e35
resolve one more, and leave two for nick.
...
svn:r13644
2008-02-21 05:53:50 +00:00
Nick Mathewson
063ced8903
r18296@catbus: nickm | 2008-02-20 23:30:11 -0500
...
Answer one xxx020 item; move 7 other ones to a new "XXX020rc" category: they should get fixed before we cut a release candidate. arma: please review these to see whether you have fixes/answers for any. Please check out the other 14 XXX020s to see if any look critical for the release candidate.
svn:r13640
2008-02-21 04:30:14 +00:00
Roger Dingledine
1c8bd320be
pass bucket sizes num_read and num_written around as size_ts
...
rather than ints
svn:r13610
2008-02-20 02:17:41 +00:00
Roger Dingledine
0977c29196
notice an integer overflow if we ever get source files with more
...
than 65k lines in them. also pointed out by veracode.
svn:r13606
2008-02-20 00:46:09 +00:00
Nick Mathewson
0399538b90
r18233@catbus: nickm | 2008-02-19 18:46:07 -0500
...
Count sockets returned from socketpair() too. This is probably not the socket counting bug.
svn:r13600
2008-02-19 23:46:08 +00:00
Nick Mathewson
9479dd3768
r18226@catbus: nickm | 2008-02-19 18:01:01 -0500
...
Brown-paper-bag time. We were failing to count all the sockets from accept().
svn:r13595
2008-02-19 23:01:07 +00:00
Roger Dingledine
4c1e516a09
cleanups and changelog entry for r13540
...
svn:r13542
2008-02-17 16:52:24 +00:00
Roger Dingledine
bd959adcb7
patch from karsten:
...
Resolved problems with (re-)fetching hidden service descriptors.
Before, v0 descriptors were not fetched at all (fix on 0.2.0.18-alpha),
re-fetching of v2 descriptors did not stop when a v0 descriptor was
received (fix on 0.2.0.18-alpha), and re-fetching of v2 descriptors did
not work in all cases (fix on 0.2.0.19-alpha).
svn:r13540
2008-02-17 16:47:47 +00:00
Nick Mathewson
ca4eb987c8
r14182@tombo: nickm | 2008-02-15 17:20:51 -0500
...
Defer, downgrade, or address more XXX020s. The remaining ones are all ones we should deal with before release.
svn:r13530
2008-02-15 23:39:08 +00:00
Nick Mathewson
d48f6425e5
r18066@catbus: nickm | 2008-02-13 11:22:19 -0500
...
Bugfix from Karsten: "Reversed r13439; v2 rendezvous descriptors were only re-fetched when a directory connection did not finish, not when a directory correctly replied with an error code like 404; bug found by nwf.
svn:r13492
2008-02-13 16:23:28 +00:00
Nick Mathewson
be1e577d5e
Re-fetch v2 rendezvous descriptor only when first try failed. Patch from karsten.
...
svn:r13439
2008-02-09 02:51:20 +00:00
Nick Mathewson
272d37deb3
r17989@catbus: nickm | 2008-02-08 18:09:23 -0500
...
Fix a new segfault when poisoning a non-present socks request.
svn:r13433
2008-02-08 23:09:26 +00:00
Nick Mathewson
eecc44dab8
r17963@catbus: nickm | 2008-02-07 10:14:25 -0500
...
Be more thorough about memory poisoning and clearing. Add an in-place version of aes_crypt in order to remove a memcpy from relay_crypt_one_payload.
svn:r13414
2008-02-07 16:10:33 +00:00
Nick Mathewson
842a33ff20
Update some copyright notices: it is now 2008.
...
svn:r13412
2008-02-07 05:31:47 +00:00
Nick Mathewson
4d70094b6e
r17951@catbus: nickm | 2008-02-06 14:34:13 -0500
...
Add more documentation; change the behavior of read_to_buf_tls to be more consistent. Note a longstanding problem with current read/write interfaces.
svn:r13407
2008-02-06 19:34:32 +00:00
Nick Mathewson
6e2946fb5d
r17949@catbus: nickm | 2008-02-06 13:21:12 -0500
...
Fix bandwidth bucked calculations again, I think. Bugfix on 0.1.2.x. Backport candidate.
svn:r13406
2008-02-06 18:21:16 +00:00
Nick Mathewson
a869574c56
r17947@catbus: nickm | 2008-02-06 11:57:53 -0500
...
Fix a bunch of DOCDOC items; document the --quiet flag; refactor a couple of XXXX020 items.
svn:r13405
2008-02-06 16:58:05 +00:00
Nick Mathewson
9c7eaa7a9d
r17918@catbus: nickm | 2008-02-05 16:39:17 -0500
...
Remove a few #if-0d items.
svn:r13392
2008-02-05 21:39:56 +00:00
Nick Mathewson
91bac90310
r17863@catbus: nickm | 2008-02-01 00:27:07 -0500
...
Bugfix from weasel: possible fix for 593: make connection_write_to_buf("") work when using zlib compression.
svn:r13347
2008-02-01 05:27:12 +00:00
Roger Dingledine
c973eb5e23
start to clean up r13250: retry v2 renddesc fetches when we
...
fail to reach the dirserver too.
svn:r13251
2008-01-24 04:45:30 +00:00
Roger Dingledine
a49f14d0d4
When we setconf ClientOnly to 1, close any current OR and Dir
...
listeners. Reported by mwenge.
svn:r13214
2008-01-21 21:21:19 +00:00
Roger Dingledine
b79850d574
Make "ClientOnly 1" config option disable directory ports too.
...
svn:r13213
2008-01-21 21:00:50 +00:00
Nick Mathewson
edf5e70784
r15891@tombo: nickm | 2008-01-12 19:20:24 -0500
...
Basic hacks to get TLS handshakes working: remove dead code; fix post-handshake logic; keep servers from writing while the client is supposed to be renegotiating. This may work. Needs testing.
svn:r13122
2008-01-13 00:20:47 +00:00
Nick Mathewson
a7ef07b4bd
r15693@tombo: nickm | 2007-12-25 19:11:29 -0500
...
Here, have some terribly clever new buffer code. It uses a mbuf-like strategy rather than a ring buffer strategy, so it should require far far less extra memory to hold any given amount of data. Also, it avoids access patterns like x=malloc(1024);x=realloc(x,1048576);x=realloc(x,1024);append_to_freelist(x) that might have been contributing to memory fragmentation. I've tested it out a little on peacetime, and it seems to work so far. If you want to benchmark it for speed, make sure to remove the #define PARANOIA; #define NOINLINE macros at the head of the module.
svn:r12983
2007-12-26 00:12:08 +00:00
Roger Dingledine
1d8a8063b9
clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
...
svn:r12786
2007-12-12 21:09:01 +00:00
Nick Mathewson
d8ad247dfd
r15088@tombo: nickm | 2007-11-30 23:47:29 -0500
...
Add support to get a callback invoked when the client renegotiate a connection. Also, make clients renegotiate. (not enabled yet, until they detect that the server acted like a v2 server)
svn:r12623
2007-12-01 08:09:48 +00:00
Nick Mathewson
c3a745951b
r16570@catbus: nickm | 2007-11-08 11:04:20 -0500
...
Keep track, for each OR connection, of the last time we added a non-padding cell to its outbuf. Use this timestamp, not "lastwritten" to tell if it is time to close a circuitless connection. (We can'tuse lastwritten, since lastwritten is updated when ever the connection flushes anything, and by that point we can no longer tell what is a padding cell and what is not.)
svn:r12437
2007-11-08 16:19:07 +00:00
Nick Mathewson
0e993e6008
r16523@catbus: nickm | 2007-11-07 11:35:49 -0500
...
Improve "tls error. breaking" message a little.
svn:r12411
2007-11-07 16:37:08 +00:00
Nick Mathewson
47fd6f7267
r16464@catbus: nickm | 2007-11-06 14:53:28 -0500
...
Also avoid overflow on or_conn->read_bucket
svn:r12401
2007-11-06 19:54:32 +00:00
Nick Mathewson
be1a5191f8
r16462@catbus: nickm | 2007-11-06 14:40:58 -0500
...
Fix bug 544: do not allow buckets to overflow. Backportable.
svn:r12400
2007-11-06 19:42:37 +00:00
Nick Mathewson
e94fad36ac
r16409@catbus: nickm | 2007-11-05 10:38:25 -0500
...
Split handshake state into its own structure. Revise versions and netinfo code to use this structure.
svn:r12380
2007-11-05 18:15:44 +00:00
Roger Dingledine
5c4a00e796
minor cleanups
...
svn:r11890
2007-10-11 22:19:18 +00:00
Nick Mathewson
b62d379f92
r15689@catbus: nickm | 2007-10-11 16:40:25 -0400
...
Fix bug 451. This was a nasty bug, so let's fix it twice: first, by banning recursive calls to connection_handle_write from connection_flushed_some; and second, by not calling connection_finished_flushing() on a closed connection. Backport candidate.
svn:r11882
2007-10-11 20:45:26 +00:00
Roger Dingledine
919f421c6c
get rid of the spurious "Freeing linked %s connection" complaints.
...
they happen whenever we fail to establish a connection.
svn:r11854
2007-10-10 22:59:34 +00:00
Nick Mathewson
1f4eafdb91
r15619@catbus: nickm | 2007-10-10 00:23:45 -0400
...
Fix bug 483: downgrade a harmless "Hey your accept() implementation sucks" warning to an info.
svn:r11828
2007-10-10 04:24:02 +00:00
Nick Mathewson
8439c4ec2f
r15512@catbus: nickm | 2007-10-02 16:27:43 -0400
...
Make some functions static; remove some dead code.
svn:r11750
2007-10-02 20:35:23 +00:00
Nick Mathewson
113367bc01
r14722@catbus: nickm | 2007-08-20 10:54:29 -0400
...
Add debugging warning to not abort in the case of bug 483. This is probably not an actual error case, so we should figure out what is really causing it and do something more sensible.
svn:r11215
2007-08-20 14:59:05 +00:00
Nick Mathewson
1f244d3943
r14639@catbus: nickm | 2007-08-17 17:45:28 -0400
...
Compile without warnings on MinGW, even with --enable-gcc-warnings enabled.
svn:r11157
2007-08-17 21:46:34 +00:00
Nick Mathewson
915c4c3ab8
r14001@catbus: nickm | 2007-07-29 21:31:53 -0400
...
Try to call time(NULL) a little less.
svn:r10980
2007-07-30 01:32:12 +00:00
Roger Dingledine
ca7c53d3cc
Be even more aggressive about separating local traffic from relayed
...
traffic when RelayBandwidthRate is set. (Refines proposal 111.)
svn:r10974
2007-07-29 22:13:44 +00:00
Nick Mathewson
7f3e2378b6
r13908@catbus: nickm | 2007-07-25 18:55:47 -0400
...
Patch from Robert Hogan: set conn->dns_server_port correctly so that we can close dns server ports when they change, thus avoiding crashes and dangling references and other sources of unhappiness.
svn:r10933
2007-07-25 22:57:07 +00:00
Nick Mathewson
483c1e9017
r13774@catbus: nickm | 2007-07-16 12:23:28 -0400
...
Tweaks on constrained socket buffers patch from coderman: Add a changelog; rename some variables; fix some long lines and whitespace; make ConstrainedSockSize a memunit; pass setsockopt a void.
svn:r10843
2007-07-16 16:23:36 +00:00
Nick Mathewson
f4a6673758
r13773@catbus: nickm | 2007-07-16 11:58:25 -0400
...
Initial "constrained socket buffers" patch from coderman. needs tweaking.
svn:r10842
2007-07-16 16:23:34 +00:00
Roger Dingledine
2c2f7ee6a4
fix a memory leak from r10504 (i think)
...
svn:r10829
2007-07-15 08:11:56 +00:00
Nick Mathewson
19389a3674
r13328@catbus: nickm | 2007-06-08 17:14:55 -0400
...
Arg. Irix apparently #defines sa_family to something. Thus, naming fields or variables "sa_family" will not work.
svn:r10541
2007-06-08 21:14:58 +00:00
Nick Mathewson
1866ad3506
r13274@catbus: nickm | 2007-06-05 19:06:30 -0400
...
Remove some deadcode that seems unlikely to return
svn:r10509
2007-06-06 04:51:25 +00:00
Nick Mathewson
210beff55a
r13266@catbus: nickm | 2007-06-05 16:38:08 -0400
...
Patch from peter palfrader: control interface via unix domain socket
svn:r10504
2007-06-05 20:54:49 +00:00
Peter Palfrader
b6c6dd7e55
Change an assert into a tor_assert
...
svn:r10495
2007-06-05 01:09:09 +00:00
Peter Palfrader
32d12dcfbc
Fix retry_all_listeners() and retry_listeners() description to match code. We are smarter than comparing lengths of want- and have-listeners.
...
svn:r10487
2007-06-04 16:58:57 +00:00
Peter Palfrader
502879e0b4
Remove force flag from retry_all_listeners() and retry_listeners(). It always was 0.
...
svn:r10486
2007-06-04 16:54:42 +00:00
Nick Mathewson
147e439c94
r13174@catbus: nickm | 2007-06-03 17:39:20 -0400
...
Patch from robert hogan: avoid crash when DNS port is set more than once.
svn:r10471
2007-06-03 21:39:24 +00:00
Nick Mathewson
9d1af71b70
r13053@catbus: nickm | 2007-05-29 13:35:33 -0400
...
Move connection_should_read_from_linked_conn into main.c, which is the only file that uses it.
svn:r10394
2007-05-29 18:20:56 +00:00
Nick Mathewson
f89a3b1448
r13050@catbus: nickm | 2007-05-29 13:31:11 -0400
...
Resolve all but 3 DOCDOCs.
svn:r10393
2007-05-29 17:31:13 +00:00
Roger Dingledine
0c047b87f5
polish r9933-r9994
...
svn:r10335
2007-05-25 19:41:31 +00:00
Roger Dingledine
32f5e19168
remove an obsolete notion that we judge runningness based on
...
whether we have a connection open to the server right now.
svn:r10333
2007-05-25 19:22:26 +00:00
Nick Mathewson
703bf19620
r12942@catbus: nickm | 2007-05-24 16:31:22 -0400
...
Well, that was easier than I thought it would be. Tor is now a DNS proxy as well as a socks proxy. Probably some bugs remain, but since it A) has managed to resolve one address for me successfully, and B) will not affect anybody who leaves DNSPort unset, it feel like a good time to commit.
svn:r10317
2007-05-24 20:31:30 +00:00
Nick Mathewson
6975a093e9
r12853@catbus: nickm | 2007-05-22 11:36:54 -0400
...
Make connection_array into a smartlist.
svn:r10292
2007-05-22 15:49:14 +00:00
Nick Mathewson
b837191fd0
r12768@catbus: nickm | 2007-05-16 17:25:33 -0400
...
Fix GCC warnings related to local parameters/variables getting shadowed.
svn:r10198
2007-05-16 22:15:14 +00:00
Nick Mathewson
473c266fc2
r12496@catbus: nickm | 2007-04-22 23:04:05 -0400
...
When logging memory usage, break down memory used in buffers by buffer type.
svn:r10004
2007-04-23 03:04:46 +00:00
Nick Mathewson
bbd63a9ae0
r12482@catbus: nickm | 2007-04-21 13:30:24 -0400
...
Rename a couple of confusing fields
svn:r9996
2007-04-21 17:30:42 +00:00
Nick Mathewson
648065fcb4
r12763@Kushana: nickm | 2007-04-20 18:42:58 -0400
...
Initial version of code to stop using socket pairs for linked connections. Superficially, it seems to work, but it probably needs a lot more testing and attention.
svn:r9995
2007-04-21 17:26:12 +00:00
Nick Mathewson
227b2e0226
r12759@Kushana: nickm | 2007-04-20 08:47:20 -0400
...
Track the number of connection_t separately from the number of open sockets. It is already possible to have connections that do not count: resolving conns, for one. Once we move from socketpairs to linked conns, and once we do dns proxying, there will be lots of such connections.
svn:r9994
2007-04-21 17:24:18 +00:00
Nick Mathewson
d1381aef82
r12652@Kushana: nickm | 2007-03-25 15:01:48 -0400
...
A surprisingly simple patch to stop reading on edge connections when their circuits get too full, and start again when they empty out. This lets us remove the logic to block begin_dir conns when the corresponding or conns get full: it was already broken by cell queues anyway.
svn:r9905
2007-03-26 14:08:18 +00:00
Nick Mathewson
306d5400c3
r12643@0-41-wifi: nickm | 2007-03-23 14:56:35 -0400
...
Refactor a bunch of functions that take edge_connection_t not to also take a crypt_path_t; the cpath is implicit.
svn:r9899
2007-03-24 15:57:51 +00:00
Roger Dingledine
2cf63f8a62
Don't save non-general-purpose router descriptors to the disk cache,
...
because we have no way of remembering what their purpose was when
we restart.
svn:r9894
2007-03-21 15:37:30 +00:00
Roger Dingledine
93e7627694
a stopgap measure while we wait for proposal 111: apply the
...
stricter rate limiting to all OR conns except those that have
been touched by local circuits.
svn:r9882
2007-03-20 03:21:51 +00:00
Roger Dingledine
b4f743562f
Add a separate set of token buckets for relayed traffic. Right
...
now that's just defined as answers to directory requests.
svn:r9881
2007-03-20 02:55:31 +00:00
Nick Mathewson
52713788b4
r12080@catbus: nickm | 2007-03-04 21:40:55 -0500
...
Remove dnsworkers and related code. there goes another 550 lines of code.
svn:r9736
2007-03-05 02:40:58 +00:00
Nick Mathewson
92f62b3684
r12077@catbus: nickm | 2007-03-04 16:08:23 -0500
...
Remove support for v0 control protocol from 0.2.0.x trunk; send back error when we receive a v0 control message. (Leave "if(v1){...}"blocks indented for now so this patch is easier to read.) ((Finally, the linecount goes _down_ a little.))
svn:r9735
2007-03-04 21:08:28 +00:00
Nick Mathewson
7fcceb2c25
r12074@catbus: nickm | 2007-03-04 15:11:43 -0500
...
Make all LD_BUG log messsages get prefixed with "Bug: ". Remove manually-generated "Bug: "s from log-messages. (Apparently, we remembered to add them about 40% of the time.)
svn:r9733
2007-03-04 20:11:46 +00:00
Nick Mathewson
938de88e3b
r11942@catbus: nickm | 2007-02-25 11:22:12 -0500
...
Fix connection_get_by_type_state_rendquery(): This has been bogus for most of 0.1.2.x. Thanks to Karsten Loesing for finding the bug; fixes bug 399.
svn:r9651
2007-02-25 16:22:36 +00:00
Nick Mathewson
6e35b11851
r11813@catbus: nickm | 2007-02-14 11:42:58 -0500
...
Tweak stream_bw patch: Remove a couple of redundant checks, save 8 bytes per edge connection, fix spelling in the changelog; expand spec.
svn:r9586
2007-02-14 16:46:55 +00:00
Nick Mathewson
4a74812c70
r11812@catbus: nickm | 2007-02-14 11:22:08 -0500
...
Apply stream_bw patch from Robert Hogan.
svn:r9585
2007-02-14 16:46:49 +00:00
Nick Mathewson
759c58151e
r11775@catbus: nickm | 2007-02-12 16:39:09 -0500
...
Update copyright dates.
svn:r9570
2007-02-12 21:39:53 +00:00
Roger Dingledine
731d37f717
more useful log messages when we give up on a stream
...
svn:r9552
2007-02-11 02:15:42 +00:00
Nick Mathewson
e00a1cbf16
r11726@catbus: nickm | 2007-02-08 16:04:53 -0500
...
Resolve some XXXX012 items:
- Remove PathlenCoinWeight: if we want it again, we can add it
back in.
- Ditto with RelayBandwidth*.
- Decide to leave in the "hey, you didn't set end_reason!" BUG log message,
but stop telling people to bug me personally.
- Postpone strengthening assert_connection_ok(): it's important, but
it's also a good way to introduce weird bugs.
- Move some expensive consistency checking from dns_free_all() into
assert_cache_ok().
svn:r9533
2007-02-08 22:07:56 +00:00
Nick Mathewson
6149ab01f8
r12129@Kushana: nickm | 2007-02-03 09:57:36 -0500
...
Update assert_connection_ok() to match the "block tunnelled dir conn if the or conn is full" logic. This may fix bug 385.
svn:r9479
2007-02-03 14:57:47 +00:00
Nick Mathewson
76f896e714
r11607@catbus: nickm | 2007-01-30 17:19:27 -0500
...
Audit non-const char arguments; make a lot more of them const.
svn:r9466
2007-01-30 22:19:41 +00:00
Nick Mathewson
9984cad6e8
r11552@catbus: nickm | 2007-01-27 03:55:02 -0500
...
This one is a little tricky. Our BEGIN_DIR implementation has a
problem: the dirserv conns will decide they can flush all their data
immediately, since the edge_conns will read greedily.
For our 0.1.2 workaround, we track which or_conn a bridged dirserv
conn is attached to, and stop writing when its outbuf is too full, and
start writing again when the or_conn's outbuf empties out a little.
This requires a bit of pointer management. Let's hope it works.
svn:r9432
2007-01-27 08:55:06 +00:00
Roger Dingledine
75a5fde460
Stop saying !is_internal_IP() when we really meant
...
connection_is_rate_limited(). One day this will be useful.
svn:r9422
2007-01-26 08:13:53 +00:00
Roger Dingledine
99c1771432
never refuse directory requests from local addresses
...
svn:r9421
2007-01-26 08:01:29 +00:00
Nick Mathewson
c0c67d28f5
r9727@catbus: nickm | 2007-01-22 16:12:39 -0500
...
Remove redundant check for whether _connection_write_to_buf_impl is called with a zlib and a non-directory connection: TO_DIR_CONN will already assert if it gets a non-dir connection.
svn:r9390
2007-01-23 19:22:46 +00:00
Roger Dingledine
ab838bddb8
Flush local controller connection buffers periodically as we're
...
writing to them, so we avoid queueing 4+ megabytes of data before
trying to flush.
Also add a new XXX012.
svn:r9382
2007-01-22 06:07:51 +00:00
Roger Dingledine
bcbd289af5
If our system clock jumps back in time, don't publish a negative
...
uptime in the descriptor. Also, don't let the global rate limiting
buckets go absurdly negative.
svn:r9377
2007-01-21 06:24:05 +00:00
Roger Dingledine
060be4c62b
man, i could have sworn that compiled
...
svn:r9369
2007-01-18 03:42:45 +00:00
Roger Dingledine
a3eaabfeb2
Be willing to read or write on local connections (e.g. controller
...
connections) even when the global rate limiting buckets are empty.
svn:r9368
2007-01-18 03:38:24 +00:00
Roger Dingledine
cb472fc550
break out the big guns: reject dir requests much more
...
aggressively. my vidalia bandwidth graph, when rate limiting
to 32kB/s, has the "write" line constantly at 32kB. I can't
imagine what's going on with the relay latency but it can't
be good.
svn:r9366
2007-01-17 01:29:54 +00:00
Nick Mathewson
11ed4500de
r11975@Kushana: nickm | 2007-01-15 17:11:15 -0500
...
set or_conn->tls_error to 0 on non-error to avoid looking at stale errors.
svn:r9359
2007-01-15 22:11:21 +00:00
Nick Mathewson
380f8983c7
r11966@Kushana: nickm | 2007-01-15 16:12:17 -0500
...
Tidy up ORCONN reason patch from Mike Perry. Changes: make some of the handling of TLS error codes less error prone. Enforce house style wrt spaces. Make it compile with --enable-gcc-warnings. Only set or_conn->tls_error in the case of an actual error. Add a changelog entry.
svn:r9355
2007-01-15 21:21:05 +00:00
Nick Mathewson
ead35ef944
r11957@Kushana: nickm | 2007-01-15 15:25:57 -0500
...
Patch from Mike Perry: Track reasons for OR connection failure; display them in control events. Needs review and revision.
svn:r9354
2007-01-15 21:13:37 +00:00
Nick Mathewson
d6073cc7fa
r11864@Kushana: nickm | 2007-01-06 01:25:59 -0500
...
Fix an XXXX012 in connection.c: prevent overflows on unfeasibly-high-bandwidth servers on 32-bit architectures.
svn:r9282
2007-01-06 06:27:15 +00:00
Roger Dingledine
48a9fe4bbd
be a bit less eager to reject v1 dir requests due to load
...
svn:r9271
2007-01-05 06:59:36 +00:00
Roger Dingledine
658c09c06f
more progress and cleanups
...
svn:r9269
2007-01-05 06:03:10 +00:00
Nick Mathewson
8728e2826f
r11744@Kushana: nickm | 2006-12-28 23:43:53 -0500
...
Refactor connection_write_to_buf_zlib back into connection_write_to_buf. Hooray for dumping duplicate code.
svn:r9209
2006-12-29 05:07:04 +00:00
Nick Mathewson
26c0d6ec58
r11743@Kushana: nickm | 2006-12-28 23:13:21 -0500
...
Refactor _connection_controller_force_write back into conncetion_handle_write. Again, the line count goes down: groovy!
svn:r9208
2006-12-29 05:06:47 +00:00
Nick Mathewson
361998d0f3
r11741@Kushana: nickm | 2006-12-28 22:41:29 -0500
...
Count TLS bytes accurately: previously, we counted only the number of bytes read or transmitted via tls, not the number of extra bytes used to do so. This has been a lonstanding wart. The fix "Works for me".
svn:r9207
2006-12-29 03:42:46 +00:00
Nick Mathewson
b59573949e
r11736@Kushana: nickm | 2006-12-28 17:46:23 -0500
...
Mark a pile of XXXX comments as targetted for 0.1.2: some because they look important, some because they look easy.
svn:r9205
2006-12-29 02:47:51 +00:00
Nick Mathewson
d9f1f3533d
r11724@Kushana: nickm | 2006-12-28 14:22:35 -0500
...
Refactor and unify my-ip-addr-changed logic. Make change in IP address or in nameservers reset and relaunch DNS hijacking tests.
svn:r9200
2006-12-28 21:29:20 +00:00
Roger Dingledine
488b4726a7
reinstate the most important dead chickens for limiting
...
impact of directory writes now that we're write limiting.
a few more dead chickens remain.
svn:r9170
2006-12-23 08:48:16 +00:00
Roger Dingledine
04409f202d
reenable write limiting. nick finally convinced me this was
...
a smart move.
more todo sub-items remain for it.
svn:r9101
2006-12-13 07:08:36 +00:00
Roger Dingledine
ee144598c8
minor cleanups and notes
...
svn:r9093
2006-12-12 20:19:54 +00:00
Nick Mathewson
a91c12f2e7
r9855@Kushana: nickm | 2006-12-04 00:55:09 -0500
...
Merge circuit_about_to_close_connection and connection_about_to_close_connection.
svn:r9021
2006-12-04 05:55:40 +00:00
Roger Dingledine
c5b90daf86
cleanups, bump to 0.1.2.4-alpha
...
svn:r9015
2006-12-02 22:47:46 +00:00
Nick Mathewson
1913cb915e
r9308@totoro: nickm | 2006-11-13 18:41:23 -0500
...
Add support for (Free?)BSD's natd, which was an old way to let you
have your firewall automatically redirect traffic. (Original patch
from Zajcev Evgeny, updated for 0.1.2.x by tup.)
svn:r8946
2006-11-14 00:06:31 +00:00
Nick Mathewson
fa6fbbc150
r9307@totoro: nickm | 2006-11-13 18:25:56 -0500
...
Patch from tup based on patch from Zajcev Evgeny: Make TransPort work even when the server wants to talk before the client.
svn:r8945
2006-11-14 00:06:02 +00:00
Nick Mathewson
b27cb38dee
r9307@Kushana: nickm | 2006-10-20 13:53:54 -0400
...
Have connection_about_to_close use an end_reason field in edge_connection_t to tell what reason to tell the controller for closing the stream. Set end_reason in connection_edge_end, connection_mark_unattached_ap, and everwhere we set edge_has_sent_end. Add a changelog entry.
svn:r8779
2006-10-20 17:54:48 +00:00
Nick Mathewson
12af87539b
r9303@Kushana: nickm | 2006-10-20 12:07:34 -0400
...
Start implementing reason extension for stream events to match the one one used by circuit events. (Not a complete implementation yet; actual reasons are not passed to control.c)
svn:r8777
2006-10-20 17:54:36 +00:00
Roger Dingledine
1cf37f90c4
bugfix and cleanups re: entry guards.
...
svn:r8620
2006-10-06 23:37:07 +00:00
Nick Mathewson
4c56ac93ca
r8851@totoro: nickm | 2006-10-02 18:13:27 -0400
...
Remove/clarify some XXXs for no longer being accurate; for begin things we do not indend to fix; for already being parts of big todo issues (like "/* XXX ipv6 */"); etc. Also fix some spaces.
svn:r8580
2006-10-02 22:13:42 +00:00
Nick Mathewson
bff83b666c
r8846@totoro: nickm | 2006-10-02 16:59:57 -0400
...
Move is_local_IP to config.c; have it check for same-/24; make it used only for reachability (not for banwidth, because that is probably not what we want). Fixes an XXX.
svn:r8578
2006-10-02 21:00:35 +00:00
Roger Dingledine
3fcf736c83
misc touchups
...
svn:r8568
2006-10-01 21:42:44 +00:00
Nick Mathewson
2cb956d1f5
r9036@Kushana: nickm | 2006-09-29 18:59:51 -0400
...
I am glad that arma reviews my patches.
svn:r8546
2006-09-29 22:59:59 +00:00
Nick Mathewson
7d366f61cb
r9025@Kushana: nickm | 2006-09-29 18:33:13 -0400
...
Differentiate more duplicated log entries
svn:r8542
2006-09-29 22:33:40 +00:00
Nick Mathewson
8308a37908
r9023@Kushana: nickm | 2006-09-29 17:27:24 -0400
...
Make distinct all non-bug messages at notice or higher that appear 3 or more times.
svn:r8541
2006-09-29 22:33:34 +00:00
Nick Mathewson
9988112c87
r8973@Kushana: nickm | 2006-09-28 16:53:19 -0400
...
Refactor entry guard status logic a lot; allow more factors [like not
having a Guard flag or being listed in ExcludeNodes] to render a guard
"unlisted" (now called "unusable"); track guard down status (now
called "unreachable") separately from is_running.
svn:r8519
2006-09-28 23:57:44 +00:00
Roger Dingledine
9af3175687
parameterize the loudness of get_interface_address()
...
svn:r8358
2006-09-09 19:20:27 +00:00
Roger Dingledine
6fdc63aed2
simplify the connection_write_to_buf_zlib() wrapper.
...
svn:r7042
2006-08-13 23:38:30 +00:00
Nick Mathewson
5cff4164a0
r7299@Kushana: nickm | 2006-08-10 01:08:58 -0700
...
Patch from Tup to add support for transparent AP connections: this basically bundles the functionality of trans-proxy-tor into the tor mainline. Now hosts with compliant pf/netfilter implementations can redirect TCP connections straight to Tor without diverting through SOCKS.
svn:r7007
2006-08-10 09:01:37 +00:00
Nick Mathewson
85f381153b
r6949@Kushana: nickm | 2006-07-28 10:17:38 -0400
...
Shave another 8 bytes from connection_t: turn inbuf_reached_eof into a bit, and lower timestamp_lastempty to or_connection_t
svn:r6934
2006-07-28 15:11:20 +00:00
Nick Mathewson
6dc13cdbeb
r6948@Kushana: nickm | 2006-07-28 10:10:35 -0400
...
Identify some likely target fields for lowering; lower global_identifier (since we only use it for AP streams and origin circs).
svn:r6933
2006-07-28 15:11:11 +00:00
Nick Mathewson
5227395aba
r6922@Kushana: nickm | 2006-07-26 16:32:24 -0400
...
Rename some fields, compress a bitfield, and document some structs and fields
svn:r6919
2006-07-27 05:03:57 +00:00
Nick Mathewson
dd779d99ea
Fix comments that implied that only dir connections had a purpose field, and the code that believed in those comments.
...
svn:r6918
2006-07-27 04:10:51 +00:00
Nick Mathewson
ec82db6995
r6909@Kushana: nickm | 2006-07-26 13:05:58 -0400
...
Clean up wide lines from last patch.
svn:r6907
2006-07-26 19:07:37 +00:00
Nick Mathewson
4ff4577beb
r6908@Kushana: nickm | 2006-07-26 12:38:52 -0400
...
Refactor connection_t into edge, or, dir, control, and base subtypes. This might save some RAM on busy exit servers, but really matters most in terms of correctness.
svn:r6906
2006-07-26 19:07:26 +00:00
Roger Dingledine
97a14b2018
tweak
...
svn:r6795
2006-07-20 23:33:11 +00:00
Roger Dingledine
fad85f173a
when an exit node gets a malformed begin cell, don't complain to
...
the node operator, since he can't do anything about it.
svn:r6733
2006-07-06 02:44:07 +00:00
Nick Mathewson
337ad6420b
Make connection_write_to_buf_zlib set outbuf_flushlen right.
...
svn:r6651
2006-06-18 08:53:09 +00:00
Nick Mathewson
537104c908
write_to_buf != connection_write_to_buf. Also, add a connection_write_to_buf_zlib wrapper that sucks.
...
svn:r6650
2006-06-18 08:46:55 +00:00
Nick Mathewson
1d9923da7c
Instead of adding servers and v1 directories to buffers en masse, directory servers add them on the fly as their outbufs are depleted. This will save ram on busy dirservers.
...
svn:r6641
2006-06-18 07:38:55 +00:00
Roger Dingledine
91bd12c20d
re-enable per-connection rate limiting. get rid of the "OP bandwidth"
...
concept. lay groundwork for "bandwidth classes" -- separate global
buckets that apply depending on what sort of conn it is.
svn:r6563
2006-06-07 09:18:53 +00:00
Roger Dingledine
45065f1466
simplify code now that libevent considers all sockets pollable.
...
what we really mean now is ">= 0", which is clearer to test for.
svn:r6543
2006-06-05 09:08:10 +00:00
Nick Mathewson
853e2d99b6
Add a new warning to our "warn a lot" list: unused parameters. This means we have to explicitly "use" unuseds, but it can catch bugs. (It caught two coding mistakes so far.)
...
svn:r6532
2006-06-04 22:42:13 +00:00
Roger Dingledine
1bf0f99b66
connection_t kept the identity_pkey but all it did was store it and
...
free it. perhaps we don't need it after all?
svn:r6518
2006-05-30 06:23:44 +00:00
Roger Dingledine
e24e5475fb
forward-port the ORPort==0 patch
...
svn:r6430
2006-05-03 18:29:44 +00:00
Roger Dingledine
e754664d62
bugfix: when we fail to bind or listen on an incoming or outgoing
...
socket, we should close it before failing. otherwise we just
leak it. (thanks to weasel for finding.)
svn:r6284
2006-04-01 10:22:57 +00:00
Roger Dingledine
d1d0813cf3
Allow non-printable characters for exit streams (both for
...
connecting and for resolving). Now we tolerate applications
that don't follow the RFCs. But continue to block malformed
names at the socks side.
svn:r6193
2006-03-19 03:55:48 +00:00
Roger Dingledine
581795f41d
auth dir servers were only modifying a server's is_running field
...
when they created a network status. so if nobody asked for a
network status, they would never discover that any servers are
is_running, so they could never build a circuit.
svn:r6183
2006-03-18 01:24:04 +00:00
Nick Mathewson
bd8ffccae7
More cleanups noticed by weasel; also, remove macros that nobody uses.
...
svn:r6143
2006-03-12 23:31:16 +00:00
Roger Dingledine
946317ae13
start using OR_CONN_EVENT_NEW.
...
also fixes a seg fault in tor (bug 261).
svn:r6101
2006-03-08 22:29:08 +00:00
Nick Mathewson
5777ee0e1a
Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
...
svn:r6087
2006-03-05 09:50:26 +00:00
Roger Dingledine
d113b75da6
more log conversions.
...
whee.
svn:r6003
2006-02-13 09:02:35 +00:00
Roger Dingledine
350313d77a
Let the users set ControlListenAddress in the torrc.
...
This can be dangerous, but there are some cases (like a secured
LAN) where it makes sense.
svn:r5997
2006-02-13 06:25:16 +00:00
Nick Mathewson
ae4f0467c8
enforce whitespace style
...
svn:r5984
2006-02-12 22:27:09 +00:00
Roger Dingledine
e847085c04
When a client asks for an old-style directory and our write bucket
...
is empty, don't give it to him. This way small servers can continue
to serve the directory *sometimes*, without getting overloaded.
svn:r5968
2006-02-11 23:15:40 +00:00
Roger Dingledine
5f051574d5
Happy new year!
...
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
31f2705d9a
and make sure that never happens again
...
svn:r5932
2006-02-09 02:42:33 +00:00
Nick Mathewson
2bb4fd24de
char *x = "y"; is not good C.
...
svn:r5926
2006-02-06 05:01:44 +00:00
Roger Dingledine
640c555f02
Fix a major load balance bug: we were round-robining in 16 KB chunks, and
...
servers with bandwidthrate of 20 KB, while downloading a 600 KB directory,
would starve their other connections. Now we try to be a bit more fair.
svn:r5906
2006-02-04 08:58:51 +00:00
Roger Dingledine
a1dd751f30
when we fail to bind a listener, try to provide a more useful log msg.
...
svn:r5900
2006-02-03 12:26:10 +00:00
Roger Dingledine
d682c84e79
attempted patch for bug 220: don't assert when we've tried all the
...
intro points for a hidden service and we try fetching the service
descriptor again.
svn:r5838
2006-01-17 04:16:59 +00:00
Roger Dingledine
7d1f675c85
entry nodes are now entry guards.
...
this is our last easy chance for a wholesale change. heave ho.
svn:r5782
2006-01-10 22:42:44 +00:00
Roger Dingledine
d4d7a49411
fix typo
...
svn:r5750
2006-01-07 02:12:38 +00:00
Nick Mathewson
878962bee1
Add reasons to DESTROY and RELAY_TRUNCATED cells.
...
svn:r5734
2006-01-05 21:23:03 +00:00
Roger Dingledine
d8e3bc0288
fix a wrong string
...
svn:r5733
2006-01-05 12:18:34 +00:00