Commit Graph

722 Commits

Author SHA1 Message Date
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
Roger Dingledine
dbd7b97eff helper nodes are dead. long live entry nodes.
(config options EntryNodes and StrictEntryNodes still not
implemented.)


svn:r5673
2005-12-28 09:07:31 +00:00
Roger Dingledine
4088f7dfd1 fix typo
svn:r5667
2005-12-27 09:04:36 +00:00
Nick Mathewson
1af630d32c Bite the bullet and limit all our source lines to 80 characters, the way IBM intended.
svn:r5582
2005-12-14 20:40:40 +00:00
Roger Dingledine
58366ffd24 when we changed from log_fn to debug/info/notice/warn/err,
we screwed up the formatting in wild and unpredictable ways.

fix it before it becomes convention to format logs in wild and
unpredictable ways.

still need to do src/common/ someday.


svn:r5551
2005-12-10 09:36:26 +00:00
Nick Mathewson
b03e8733f3 Change how OR conns get removed from the identity map; fix some warnings on shutdown.
svn:r5509
2005-12-05 19:15:27 +00:00
Nick Mathewson
a6eb8cd2a0 Move connection_or_remove_from_identity_map() to connection_unlink, but dont remove the other; just make it warn.
svn:r5470
2005-11-30 04:28:41 +00:00
Nick Mathewson
3bd613b44d Rename connection_get_by_identity_digest to reflect that it is OR-only. Make it use a hashtable instead of a linear search.
svn:r5469
2005-11-30 03:01:16 +00:00
Nick Mathewson
652e1899ac "How about 'never'? Does 'never' work for you?"
Weasel says circuit_get_by_conn is his main timesink.  Most of its
users were just checking whether OR conns had circuits, so add a
circuit count to OR conns, and check that. One was
circuit_about_to_close_conn, which was doing an O(n^2) series of calls
to get all circs on an OR conn, so make an O(n) function for that.
Finally, circuit_get_by_edge_conn was using it as a sanity test that
has been around for a while but never found any actualy insanity, so
kill that.

circuit_get_by_conn is finally dead, which is good, since it was never
sane to begin with.


svn:r5460
2005-11-26 01:43:57 +00:00
Nick Mathewson
31d5d96739 Cut down a common call to circuit_get_by_conn by about half.
svn:r5459
2005-11-26 00:53:51 +00:00
Roger Dingledine
6452aecedb when calling connection_get_by_identity_digest, don't do a memcmp
for non-OR conns. this should save a bit of time.


svn:r5456
2005-11-25 06:43:53 +00:00
Roger Dingledine
7aae63994f Recover better from TCP connections to Tor servers that are broken but
don't tell you (it happens!); and rotate TLS connections once a week.

1) If an OR conn becomes more than a week old, make it obsolete.
2) If it's obsolete and empty, kill it.
3) When an OR makes a second connection to you, allow it.
4) If we want to send a new create cell, but the best conn we've
   got is obsolete, and the router is 0.1.1.9-alpha-cvs or later, ask
   for a new conn instead.
5) When we time out on circuit building on the first hop, make that
   connection obsolete.


svn:r5429
2005-11-19 06:57:44 +00:00
Roger Dingledine
26d8c3498c and another overly common log entry
svn:r5417
2005-11-18 00:35:29 +00:00
Roger Dingledine
e6fd88c698 simplify a log entry
svn:r5353
2005-11-11 17:03:35 +00:00
Nick Mathewson
80758473f8 fix a signed/unsigned warning
svn:r5344
2005-11-01 17:28:49 +00:00
Roger Dingledine
bf2be9abd7 Do round-robin writes of at most 16 kB per write. This might
be more fair on loaded Tor servers, and it might resolve our
Windows crash bug. It might also slow things down.


svn:r5332
2005-10-29 18:19:37 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
452f4cfa09 Convert circuituse, command, config, connection, relay, router, test to new logging interface
svn:r5308
2005-10-25 07:04:36 +00:00
Peter Palfrader
0d9aedfcea Downgrade a few INFO level logs to DEBUG again. Also add two or three new
logs in cases where a calling function's log was downgraded and we wouldn't
get any log message otherwise.


svn:r5263
2005-10-17 16:21:42 +00:00
Roger Dingledine
fd165329b8 start calling it *ListenAddress rather than *BindAddress,
since none of our users know what it means to bind an address or port.


svn:r5260
2005-10-17 03:17:29 +00:00
Peter Palfrader
7b15f77dd6 Make a few INFO log lines into DEBUG
svn:r5257
2005-10-17 02:13:36 +00:00
Roger Dingledine
ae92a91d96 more log uncluttering
svn:r5254
2005-10-17 01:29:28 +00:00
Roger Dingledine
78edd804ff fix a malformed warning entry
svn:r5219
2005-10-07 19:49:48 +00:00
Peter Palfrader
14934dece2 Print address too when we say we cannot bind/listen
svn:r5213
2005-10-07 18:48:31 +00:00
Nick Mathewson
cc35e1720f Using RAND_pseudo_bytes instead of RAND_bytes is an accident waiting to happen, and does not really speed us up much when we do it. So stop doing it.
svn:r5210
2005-10-06 22:18:01 +00:00
Nick Mathewson
039edb3dbb Downgrade too-frequent "nothing happened" message from info to debug
svn:r5200
2005-10-05 22:32:59 +00:00
Nick Mathewson
6e4608701d and another leak.
svn:r5175
2005-09-30 21:31:26 +00:00
Roger Dingledine
ae30c8101b by convention, addr is a uint32_t and address is a string.
that's why we hadn't caught that leak.


svn:r5174
2005-09-30 21:30:04 +00:00
Nick Mathewson
5c5d2e82e6 Fix a leak when launching listeners.
svn:r5173
2005-09-30 21:28:00 +00:00
Nick Mathewson
92451f74a8 Reformat inconsistent function declarations.
svn:r5160
2005-09-30 01:09:52 +00:00
Nick Mathewson
5c53545d81 Add a bunch more warnings to out warning suite; resolve them; pack structs a little better.
svn:r5150
2005-09-29 22:59:17 +00:00
Nick Mathewson
7c6679d8dc Add new config.c function to set options that can fail, and roll back if they do. This should solve the setconf-an-impossible-port bug.
svn:r5046
2005-09-14 02:36:29 +00:00
Roger Dingledine
63bb27f19d be more thorough about noticing when a directory request has failed:
it has failed not only when the connection attempt fails, but also
if the conn reaches eof before we get a response that we're happy with.


svn:r5013
2005-09-12 07:36:26 +00:00
Nick Mathewson
3dc5e77b58 Numerous changes to move towards client-side v2 directories.
connection.c:
- Add some more connection accessor functions to make directory
  download redundancy checking work.

directory.c, or.h, router.c, routerlist.c:
- Start on logic to note when networkstatus downloads fail.

dirserv.c, routerlist.c, routerparse.c:
- Start maintaining an is_named field in routerstatus_t.  Don't
  actually look at it yet.

dirserv.c, routerlist.c:
- Remove expired networkstatus objects.

or.h:
- Make some booleans into bitfields
- Add prototypes

routerlist.c:
- Sort networkstatus list by publication time
- Function to remove old (older than 10 days) networkstatus objects.
- Function to set a list of routerinfo_ts' status info from the
  current set of networkstatus objects.
- Function to tell which routerinfos we need to download based no the
  current set of networkstatus objects.
- Do not launch a networkstatus download if a redundant one is in progress.

routerparse.c:
- Keep router entries in networkstatus sorted by digest.


svn:r5012
2005-09-12 06:56:42 +00:00
Nick Mathewson
4ce0e01848 add conn->requested_resource to connection_t checks.
svn:r4951
2005-09-08 21:21:54 +00:00
Nick Mathewson
059148f588 Only caches download network-status for now, and they use a different strategy. Add an element to connection_t to remember what we are downloading, and a function to recognize our own fingerprint.
svn:r4944
2005-09-08 20:18:15 +00:00
Roger Dingledine
893acb3acc Make a new AssumeReachable config option that will publish anyway.
Also, let authdirservers start without setting their Address field.
Something is still not working though. Will fix in morning.


svn:r4839
2005-08-26 07:41:19 +00:00
Nick Mathewson
4e735da5da Also set event_mask=0 in connection_free_all, and dont send events to marked control conns (for good measure)
svn:r4729
2005-08-07 19:27:38 +00:00
Roger Dingledine
5c4da9dec6 incomplete patch for matt's info controller signal term bug
svn:r4728
2005-08-07 19:20:55 +00:00
Nick Mathewson
303258972b Fix idiot bug. The "free the IP history" code belons in connection_free_all(), not in connection_free(). You can all mock me now.
svn:r4691
2005-08-04 18:29:01 +00:00
Nick Mathewson
11ff0aba80 Make clients regenerate their keys when their IP address changes.
svn:r4688
2005-08-03 20:42:17 +00:00
Nick Mathewson
18c11eb3bc Be consistent about preferring foo* to struct foo*
svn:r4637
2005-07-22 21:12:10 +00:00
Nick Mathewson
c3a62c1739 Initial, somewhat dodgy implementation of helper nodes. It has too many XXXXs, it logs too verbosely, and it doesnt do persistence.
svn:r4633
2005-07-22 17:32:25 +00:00
Roger Dingledine
452c98058f missed one
svn:r4567
2005-07-14 23:08:55 +00:00
Roger Dingledine
d8d0feb633 tell us what kind of listener it is, too
svn:r4566
2005-07-14 23:07:05 +00:00
Nick Mathewson
f86a1e634f fix opening listener log msg
svn:r4565
2005-07-14 23:04:31 +00:00
Nick Mathewson
e94f95a716 Populate address field of listeners with an actually sane value.
svn:r4564
2005-07-14 22:56:17 +00:00
Roger Dingledine
2259032ea1 trivial changes on nick's rendezvous commit
svn:r4553
2005-07-14 08:43:19 +00:00
Nick Mathewson
cf13b3e4a6 Macro-fu to get DEBUG events working.
svn:r4539
2005-07-13 05:14:42 +00:00
Nick Mathewson
658e1196d0 Change retry_listeners: when force is false, close and re-open a minimal set of listeners (i.e., those that do not match the configuration). This fixes a possible bug on some windowses. Maybe.
svn:r4528
2005-07-11 17:20:22 +00:00
Nick Mathewson
f9f09f1c5e Start implementing framework for revised control spec.
svn:r4447
2005-06-17 18:49:55 +00:00
Nick Mathewson
d4972bd2e1 Remove code that has been #if-0ed for a long time.
svn:r4435
2005-06-15 18:34:46 +00:00
Nick Mathewson
232861ba42 Docment or add DOCDOC comments to undocumented functions in src/or. Make function definition format uniform.
svn:r4411
2005-06-11 18:52:12 +00:00
Roger Dingledine
2587fa09f9 move more docs into our code
svn:r4406
2005-06-11 06:07:22 +00:00
Nick Mathewson
0831823763 Change end-of-file NLNL convention. It turns out arma I and I agree.
svn:r4382
2005-06-09 19:03:31 +00:00
Roger Dingledine
cfc89f8753 pay more attention to the ClientOnly config option
svn:r4367
2005-06-09 08:54:42 +00:00
Roger Dingledine
aff308e6d9 reenable the part of the code that tries to flush as soon as an OR outbuf
has a full tls record available. perhaps this will make OR outbufs not grow
as huge except in rare cases, thus saving lots of cpu time plus memory.


svn:r4343
2005-06-08 04:55:06 +00:00
Roger Dingledine
040a748d87 i screwed up the dirport reachability testing when we don't yet
have a cached version of the directory. hopefully now fixed.


svn:r4284
2005-05-23 05:20:52 +00:00
Roger Dingledine
b86716b839 If a socks connection ends because read fails, don't warn that you're
not sending a socks reply back. (bug reported by Warren Barrow)


svn:r4277
2005-05-21 00:15:23 +00:00
Roger Dingledine
f0e309e5bd add HttpProxyAuthenticator config option too
svn:r4272
2005-05-20 08:51:45 +00:00
Roger Dingledine
b7d6b8a397 doxygeny goodness from tyranix
svn:r4262
2005-05-17 17:01:36 +00:00
Nick Mathewson
10b2208d93 Make Tor compile with no warnings with gcc4.0 on OSX
svn:r4184
2005-05-07 05:55:06 +00:00
Roger Dingledine
5265bbd2b8 first iteration of scrubbing sensitive strings from logs.
also generally clean up log messages.


svn:r4174
2005-05-03 10:04:08 +00:00
Nick Mathewson
a312ce1d3b Change buffer shrinking strategy: only try to shrink once every 3 minutes. Do not try to read over buffer size unless buffer is nearly empty.
svn:r4165
2005-05-02 23:17:08 +00:00
Nick Mathewson
fe65e57ca1 Re-do fragmented control message handling to work with new buf_t system.
svn:r4144
2005-04-27 22:01:34 +00:00
Nick Mathewson
9ba2dd7ea1 Clean/renormalize whitespace
svn:r4122
2005-04-26 20:55:32 +00:00
Roger Dingledine
509405a5f7 clean up this TOR_FRAGILE business
svn:r4116
2005-04-26 18:52:16 +00:00
Nick Mathewson
74dc7eedc5 Add kludgy function to force controllers to flush EVENT_ERR_MSG events.
svn:r4057
2005-04-08 03:36:39 +00:00
Nick Mathewson
31c12e265f Move a quote, fix a log.
svn:r4056
2005-04-08 03:26:44 +00:00
Roger Dingledine
dabafddb82 fix format bug
svn:r4051
2005-04-07 22:03:56 +00:00
Nick Mathewson
8cc3307e0d Improve conn_*_to_string; add circuit_state_to_string; make skewed-descriptor messages better.
svn:r4047
2005-04-07 21:07:19 +00:00
Nick Mathewson
b897cb1ec3 Change conn_(type|state)_to_string from const arrays to switch functions so we (I) will not make Tor crash the next time we (I) add a new state.
svn:r4045
2005-04-07 20:25:22 +00:00
Roger Dingledine
620419b421 oh, and accept() into the right place, too.
svn:r4029
2005-04-06 16:16:31 +00:00
Roger Dingledine
70f3b3ef86 Forward-port the checking of
sin_addr.s_addr == 0 || sin->sin_port == 0.
This just happened on moria2, so I guess it happens rarely
on Linux as well as OS X.
We can't afford to accept OR conns from 0.0.0.0:0, since we
send created cells back to the first addr:port that matches,
and we'd better not send them to the wrong place.
So, let's drop them all for now, and see if we can find a pattern
later.


svn:r4028
2005-04-06 15:42:35 +00:00
Roger Dingledine
9cbaf4603d fix an assert trigger: when we have the rare case of accepting
a conn on 0.0.0.0:0, then when we look through the connection array,
we'll find any of the workers. this is no good.


svn:r4027
2005-04-06 15:19:32 +00:00
Nick Mathewson
88dc243bb5 Rename circuit_get_by_stream to circuit_get_by_edge_conn, and actually start using it. Watch out, kids!
svn:r4026
2005-04-06 06:43:21 +00:00
Roger Dingledine
5f0a84cbe2 update conn-type-state-strings to handle https states for ORs
svn:r4018
2005-04-06 04:55:17 +00:00
Nick Mathewson
ac268a8340 Fix Tor for no-threading compilation: move connection_unregister from _connection_free to connection_free.
svn:r4013
2005-04-06 00:46:57 +00:00
Nick Mathewson
0dc02328af Move most of *_mark_for_close out of macros.
svn:r3992
2005-04-03 05:22:33 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
c2a05e1ca9 redo the state descriptors now that we have a controller-wait state
svn:r3934
2005-03-31 17:36:24 +00:00
Roger Dingledine
36baf7219d stop most cases of hanging up on a socks connection without sending
the socks reject. audit for remaining ones. also make things more
uniform so we always remember to hold-open-until-flushed, etc.


svn:r3891
2005-03-27 04:55:13 +00:00
Roger Dingledine
1328383482 make it clearer to the human that his server is testing
its reachability. tell him when it succeeds, or when 20
minutes pass and it hasn't succeeded yet.


svn:r3882
2005-03-26 01:43:39 +00:00
Roger Dingledine
9b9dbad0b7 fix another case where we need to send a socks reply (reject)
back before we close the conn.


svn:r3876
2005-03-25 11:12:14 +00:00
Roger Dingledine
9685164fe5 don't mark a router down just because your httpsproxy is unreachable
svn:r3874
2005-03-25 10:55:06 +00:00
Nick Mathewson
d26bcfab92 Note where connection that hasnt sent end was marked.
svn:r3872
2005-03-25 05:54:50 +00:00
Roger Dingledine
bd37c9a3bd REUSEADDR on normal places means you can rebind to the port
right after somebody else has let it go. But REUSEADDR on win32
means to let you bind to the port _even when somebody else
already has it bound_. So, don't do that on Win32.


svn:r3867
2005-03-24 23:20:06 +00:00
Roger Dingledine
0dc91fd9c0 fix an assert -- we're not allowed to write onto a conn after we've
connection_unregistered it. there's still more work to be done here,
since we need to make sure to send back the socks-reply as soon as we
know what it will be -- we can't just wait until connection-about-to-close
to deal with it.


svn:r3847
2005-03-23 23:19:18 +00:00
Roger Dingledine
fb8a319ffe fix an over-eager assert, to make httpsproxy get a little farther
svn:r3846
2005-03-23 22:11:59 +00:00
Roger Dingledine
a799dad937 forward-port the commenting out of the assert that glenn fink was
triggering. we still don't know why he was triggering it.


svn:r3841
2005-03-23 20:42:37 +00:00
Roger Dingledine
7373042a7b fix assert triggers (bugs 109 and 96), and put in some
debugging logs to notice future repeat bugs.


svn:r3826
2005-03-23 02:52:55 +00:00
Roger Dingledine
e28b8aaa40 make httpsproxy more likely to work
(don't let OR conns do tls until they've finished connecting and
doing the proxy dance.)


svn:r3824
2005-03-22 23:57:18 +00:00
Nick Mathewson
df9c8feac7 Commit fixes for several pending tor core tasks: document all DOCDOCed functions; time out uncontrolled unattached streams; feed reasons to SOCKS5 (refactoring connection_ap_handshake_socks_reply in the process); change DirFetchPeriod/StatusFetchPeriod to have a special "Be smart" value.
svn:r3769
2005-03-17 12:38:37 +00:00
Nick Mathewson
97dad670ea Renormalize whitespace
svn:r3757
2005-03-14 03:18:35 +00:00
Nick Mathewson
115271f65e Implement the common case of ATTACHSTREAM.
svn:r3751
2005-03-12 04:22:01 +00:00
Nick Mathewson
afe414f070 Revise all calls to connection_edge_end to avoid sending MISC, and to take errno into account where possible.
svn:r3720
2005-03-01 22:42:31 +00:00
Nick Mathewson
4ddf768a4f Forward-port new reasons; clean up code more; add code to convert new reasons to SOCKS5 reply codes; add code to convert errnos to reasons. New code still needs to get invoked.
svn:r3719
2005-03-01 22:16:15 +00:00
Nick Mathewson
b7b05dc1b2 make control interface stream IDs monotonically increasing to prevent possible races
svn:r3715
2005-03-01 01:15:01 +00:00
Nick Mathewson
97bc49bd72 Try a little harder to avoid openssl SSL* double-free reports.
svn:r3710
2005-02-28 02:52:51 +00:00
Nick Mathewson
26e6eb7539 Check returns from libevent calls better; stop poking at internals of events to see if they are live.
svn:r3691
2005-02-25 05:42:01 +00:00
Nick Mathewson
24d7ae6fe8 Insert missing ! in assert_connection_ok; test was accidentally reversed in revision 1.329 yesterday. Should fix bug 102
svn:r3685
2005-02-24 17:08:27 +00:00
Nick Mathewson
22c38b0f9b Clarify comment. Use CONN_IS_EDGE more. Try to be more zealous about calling connection_edge_end when things go bad with edge conns in connection.c
svn:r3671
2005-02-23 20:35:26 +00:00
Nick Mathewson
6e6d95b3db Change from inet_ntoa to a threadproof tor_inet_ntoa.
svn:r3656
2005-02-22 08:18:36 +00:00
Nick Mathewson
c2d5b67dd2 After we successfully connect, try handling pending stuff immediately, rather than waiting for the next call to connection_handle_write. Roger: is this right?
svn:r3647
2005-02-22 03:02:33 +00:00
Roger Dingledine
cbb4803ec8 forward-port some fixes
svn:r3631
2005-02-17 01:12:50 +00:00
Roger Dingledine
37ca621301 when a client asks us for a dir mirror and we don't have one,
launch an attempt to get a fresh one.


svn:r3609
2005-02-10 06:31:34 +00:00
Roger Dingledine
07a3307460 remove redundant lines
svn:r3607
2005-02-09 23:54:30 +00:00
Nick Mathewson
89d422914a Patch from adam langley: always remove sockets from libevent before closing them. Should fix epoll-related bugs.
svn:r3606
2005-02-09 23:16:31 +00:00
Roger Dingledine
efa9bb5535 fix the latest bug: don't explode when some router declares a
bandwidthburst of 500 gigabytes.

this bug seems to have taken down most of the network. oops.


svn:r3523
2005-02-03 22:58:22 +00:00
Roger Dingledine
2e97593d25 define TOR_FRAGILE if you want tor to give you a core when
something goes wrong. this should only be used by people actively
tracking bugs.


svn:r3487
2005-02-01 00:37:16 +00:00
Roger Dingledine
a0312f3590 don't double-detach a closing exit conn that's waiting for dns resolve
svn:r3477
2005-01-31 01:27:49 +00:00
Roger Dingledine
692a57c8e8 but don't spring the trip on worker children, because it turns
out they don't actually remove anything before freeing the conns.


svn:r3476
2005-01-31 01:02:20 +00:00
Roger Dingledine
d6489d8e41 lay a trap for situations where we connection_free something
that's still on one of the lists.

in particular, this will detect situations where we mark-for-close
and then free it ourselves.


svn:r3475
2005-01-31 00:33:32 +00:00
Roger Dingledine
38be533c69 Handle unavailable hidden services better. We try each intro point
until none are left, then we try to refetch the descriptor. If it's
the same one we had before, then close streams right then. Whenever
a new stream arrives, even if it's right after, optimistically try
refetching the descriptor, just in case.


svn:r3379
2005-01-19 23:15:59 +00:00
Roger Dingledine
bafb3e4a5b fix another integer underflow caused by buckets going negative
svn:r3346
2005-01-12 12:19:00 +00:00
Roger Dingledine
3809c0ab91 tolerate bandwidtch buckets going negative (i hope)
svn:r3344
2005-01-12 10:00:38 +00:00
Nick Mathewson
324b192f68 Make Tor use Niels Provos's libevent instead of it's current
poll-but-sometimes-select mess.  This will let us use faster async cores
(like epoll, kpoll, and /dev/poll), and hopefully work better on Windows
too.

There are some fairly nasty changes to main.c here; this will almost
certainly break something.  But hey, that's what alphas are for.


svn:r3341
2005-01-12 06:42:32 +00:00
Nick Mathewson
65c4fa2614 Split mark-dir-failed-and-retry logic into separate function; make it retry runningrouters as well as directory fetches; note that the do-we-need-to-give-up test is wrong.
svn:r3256
2005-01-03 20:07:07 +00:00
Nick Mathewson
5f40d6bf72 Make directory fail-and-retry logic happen in connection_about_to_close(); fixes win32 bug.
svn:r3253
2005-01-03 19:51:10 +00:00
Roger Dingledine
036384fd8e respond to an 009 XXX
svn:r3201
2004-12-22 02:55:26 +00:00
Roger Dingledine
011ad3cba5 clean up logging,
make it clearer which warns are bugs,
make the control log event match its specification,
point out a bug in how we deal with failure when renewing the tls context.


svn:r3138
2004-12-13 00:44:39 +00:00
Roger Dingledine
012255fe60 fix the other half of the pipe race
svn:r3111
2004-12-07 16:37:32 +00:00
Roger Dingledine
2532e9405e Now we allow writing to the buffer even when the stream if marked for
close, if we're planning to wait to flush it.

This is important because we were sending a socks reject back if we're
closing and hadn't already sent one, but it wasn't actually getting
written since the conn was already marked-for-close.


svn:r3074
2004-12-04 07:13:37 +00:00
Roger Dingledine
ef04cfcbad one more typo
svn:r3054
2004-12-01 04:13:15 +00:00
Nick Mathewson
b457cfb5eb Spell-check strings and comments
svn:r3052
2004-12-01 03:48:14 +00:00
Nick Mathewson
6e88abf418 If we are using select, make sure we stay within FD_SETSIZE.
svn:r3051
2004-12-01 03:15:59 +00:00
Nick Mathewson
7fbd297532 Suggestion from weasel: Make tor --version --version dump the cvs Id of every file.
svn:r3019
2004-11-29 22:25:31 +00:00
Roger Dingledine
c1dc17e6e2 put in initial support for ".nickname.exit" addresses, to let alice
decide what exit node to use; based on a patch by geoff goodell.

needs more work: e.g. it goes bananas building new circuits when the
chosen exit node's exit policy rejects the connection.


svn:r3015
2004-11-29 08:34:54 +00:00
Roger Dingledine
22727b4edc wrong is ok, and right is fine, but in between is apparently
totally unacceptable to me.


svn:r3005
2004-11-28 11:39:53 +00:00
Nick Mathewson
6f5dbefa7e Normalize space: add one between every control keyword and control clause.
svn:r3003
2004-11-28 09:05:49 +00:00
Nick Mathewson
f77ff938b7 remember; tor_socket_errno has side effects!
svn:r2997
2004-11-28 05:48:02 +00:00
Roger Dingledine
7c9a707900 remove emacs droppings, since nick says he doesn't need them anymore
svn:r2989
2004-11-26 04:00:55 +00:00
Roger Dingledine
914d346095 update conn_state_to_string
svn:r2979
2004-11-24 07:58:15 +00:00
Roger Dingledine
83e7043eb8 don't process marked-for-close conns further.
(fix assert trigger -- if we're lucky.)


svn:r2975
2004-11-24 06:41:58 +00:00
Nick Mathewson
fe32c2d141 Fix sign-related warnings
svn:r2942
2004-11-22 22:50:17 +00:00
Nick Mathewson
d4754b334c Compile cleanly on windows; prevent some insane bandwidth cases (e.g., "BandwidthBurst 1000 TB" from occuring.
svn:r2941
2004-11-22 22:24:10 +00:00
Roger Dingledine
310a8da0d2 break reached_eof() out of process_inbuf()
svn:r2930
2004-11-21 10:14:57 +00:00
Roger Dingledine
6a516dfdd3 be more greedy about filling up all relay cells.
this may have some bugs in it still.
and it may end up not being what we want to do.


svn:r2928
2004-11-21 07:43:12 +00:00
Roger Dingledine
dd19cf6ba3 kill -USR2 now moves all logs to loglevel debug
plus fix some typos


svn:r2914
2004-11-20 07:33:55 +00:00
Nick Mathewson
8acaf8e187 Add "MEMUNIT" and "INTERVAL" types to configuration. Also tweak Accounting setup. More docs needed
svn:r2911
2004-11-20 00:37:00 +00:00
Roger Dingledine
67aa3b66c5 clean up socks handling, refuse connections to port 0
svn:r2888
2004-11-15 07:50:15 +00:00
Nick Mathewson
08627d5d87 Track whether descriptor is dirty/uploaded. When any options are set, mark it dirty. Once a minute, regenerate and upload the server descriptor if it is dirty.
svn:r2832
2004-11-13 16:53:48 +00:00
Nick Mathewson
60880cda84 Resolve a bunch of FIXME items; mark a lot more for attention; ask for clarification on some. Turn all XXXX008 ("showstopper for 0.0.8 release") items into XXXX009 or XXXX, since plainly they were not showstoppers for 0.0.8. Add/clean some docs.
svn:r2808
2004-11-12 16:39:03 +00:00
Nick Mathewson
2a5bcb29e6 Resolve FIXME: Possible solution to note_disconnect problem; needs thought and review.
svn:r2807
2004-11-12 05:52:19 +00:00
Nick Mathewson
0faab62cd9 Resolve FIXMES: sometimes an error code is just an error code
svn:r2805
2004-11-12 05:03:50 +00:00
Nick Mathewson
5a5be93f80 Normalize whitespace; add a "tell me about all the unnormalized whitespace" target; fix a braino in dirserv.c
svn:r2758
2004-11-09 20:04:00 +00:00
Roger Dingledine
394554cfbf Clean up copyrights.
Break connection_consider_empty_buckets() out of
connection_read_bucket_decrement().


svn:r2698
2004-11-07 01:33:06 +00:00
Roger Dingledine
6c61ed4fb5 Make options no longer a global variable.
Now we can try setting an option but back out if it fails to parse, or
  if it's disallowed (e.g. changing RunAsDaemon from 1 to 0).
Use parse_line_from_str rather than parse_line_from_file.


svn:r2692
2004-11-06 05:18:11 +00:00
Roger Dingledine
59453ac6ef add a ControlPort and control listener conn.
note that print_usage is obsolete.


svn:r2671
2004-11-04 06:41:49 +00:00
Roger Dingledine
d0c158c8d6 clarify the bandwidthburst and bandwidthrate are in bytes
(niels had thought they were in bits, or kb, or something)


svn:r2669
2004-11-04 03:25:43 +00:00
Roger Dingledine
a4753283dd better interface for connection_ap_handshake_socks_reply()
make --list-fingerprint print the fingerprint again


svn:r2668
2004-11-03 23:13:28 +00:00
Nick Mathewson
451f8b5045 - Implement all of control interface except authentication, setconfig,
and actually making the sockets.
- Make sure that identity-based nicknames start with $.
- Use new string_join interface.


svn:r2661
2004-11-03 18:33:07 +00:00
Nick Mathewson
4fdaa5de51 Streamline the two redundant "Has the second rolled over?" checks in prepare_for_poll and connection_bucket_refill; also, generate BANDWIDTH control events
svn:r2657
2004-11-03 16:38:04 +00:00
Roger Dingledine
12e92eb82f connection_read_bucket_decrement() has a side-effect that
we need to get even if we just read 0 bytes


svn:r2656
2004-11-03 10:18:31 +00:00
Nick Mathewson
347d3f9d62 Start implementing control interface.
svn:r2652
2004-11-03 01:32:26 +00:00
Nick Mathewson
8db0abb687 First attempt at hibernation code. It needs more work around the XXXXs, but first I want arma to review the basic approach while I meditate on how to fix them.
svn:r2649
2004-11-02 23:47:32 +00:00
Nick Mathewson
ad4dc74482 Use a stricter set of warnings; make them all pass.
svn:r2645
2004-11-02 03:02:17 +00:00