Commit Graph

585 Commits

Author SHA1 Message Date
Nick Mathewson
7709547c08 When we connect and finish TLS negotiation with address:port, it is obvious that any other key or nickname we might know about (as an authdirserver) does not actually exist at address:port.
svn:r4036
2005-04-06 21:09:47 +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
Nick Mathewson
4453e3794a Add a pointer from edge connections to their corresponding circuit (ulp!); add some debugging sanity-checking for cirid_orconn_map stuff
svn:r4024
2005-04-06 06:13:49 +00:00
Nick Mathewson
b7cdcf3462 Hopefully, this will make ORs much faster, and not break them: keep a big splay tree of (circid,orconn)->circuit mappings to make circuit_get_by_circid_conn much faster.
svn:r4020
2005-04-06 05:33:32 +00:00
Nick Mathewson
4991290935 Revise control spec and implementation to allow all log messages to be sent to controller with their severities intact.
svn:r4010
2005-04-05 22:56:17 +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
055ee7c323 Give better warnings if connection_close_unattached_ap gets called twice or called on a marked connection; rename it to connection_mark_unattached_ap.
svn:r3990
2005-04-02 22:11:24 +00:00
Nick Mathewson
4a90d37229 Better messages when POSTDESCRIPTOR fails
svn:r3989
2005-04-02 22:02:13 +00:00
Nick Mathewson
0e81265359 update copyright notices.
svn:r3982
2005-04-01 20:15:56 +00:00
Roger Dingledine
1f5c8335e8 still publish your descriptor if orport is reachable but dirport isn't
when building testing circs for orport testing, require high-bandwidth
nodes, so fewer circs fail. complain about unreachable orport separately
from unreachable dirport.


svn:r3935
2005-03-31 19:26:33 +00:00
Nick Mathewson
4246f6f8bc Clarify that we don't, and why we don't, need to redefine FD_SETSIZE.
svn:r3904
2005-03-28 01:07:14 +00:00
Roger Dingledine
96c331e4ed we seem to have lost our define for FD_SETSIZE on win32 in the change
from fakepoll to libevent. be sure to define it *before* we include
winsock.


svn:r3903
2005-03-27 22:52:48 +00:00
Roger Dingledine
7a79acd9f6 clean up socks reply stuff more.
add a few more reasons so we can be more informative.


svn:r3895
2005-03-27 06:37:56 +00:00
Nick Mathewson
ce854906db Rename ManageConnections to LeaveStreamsUnattached. Apparently, there was a missing "TorShould" that was mistaken for an "IWantTo".
svn:r3894
2005-03-27 06:25:33 +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
Nick Mathewson
6e4bccc4ac Make GETINFO for "network-status" work on non-authdirs
svn:r3837
2005-03-23 19:15:10 +00:00
Nick Mathewson
b9016bd18f Fix several bugs (including some crashes) related to control interface; implement missing desc/name functionality.
svn:r3836
2005-03-23 08:40:11 +00:00
Nick Mathewson
631ab5c69b Add a magic value to cpath_layer_t to make sure that we can tell valid cpaths from freed ones. I audited this once; it could use another audit.
svn:r3831
2005-03-23 06:21:48 +00:00
Nick Mathewson
ab1d0049a2 Prevent spurious closes when we put stuff on a conn that has not written for a while.
svn:r3816
2005-03-22 20:25:51 +00:00
Nick Mathewson
7a0072cc1a Specify and implement close-stream and close-circuit control messages
svn:r3814
2005-03-22 19:36:38 +00:00
Nick Mathewson
ec81f87018 Implement an option to cap bandwidth-to-advertise. Arma: can you improve the manpage entry by explaining why you would want to do this?
svn:r3813
2005-03-22 19:01:46 +00:00
Nick Mathewson
2d40991427 Report HTTP reasons to directory clients. (Also, fix format on new TODO items)
svn:r3811
2005-03-22 18:43:24 +00:00
Roger Dingledine
ed9524a626 Remove controller getinfo support for "desc/all-ids".
Replace it with getinfo "network-status" just like in directories.
This way the controller can learn which servers are running, which
are verified, etc.


svn:r3801
2005-03-22 03:27:51 +00:00
Roger Dingledine
f1ba4296c1 clean up and refactor some more
svn:r3798
2005-03-22 01:01:15 +00:00
Roger Dingledine
35953edae0 Implement controller's "extendcircuit" directive.
Also refactor circuit building so we plan the whole path ahead
of time.


svn:r3797
2005-03-22 00:42:38 +00:00
Roger Dingledine
4a497e5030 if our clock jumps forward by 100 seconds or more, assume something
has gone wrong with our network and abandon all not-yet-used circs.


svn:r3792
2005-03-19 23:58:42 +00:00
Nick Mathewson
b88c4ba11c Turn addr_policy_compare from a tristate to a quadstate; this should help address our "Ah, you allow 1.2.3.4:80. You are a good choice for google.com" problem.
svn:r3786
2005-03-19 06:57:16 +00:00
Nick Mathewson
11aa682812 Split version info into separate spec doc.
svn:r3783
2005-03-19 05:07:19 +00:00
Roger Dingledine
ec7f232b24 make hidden services more likely to work from the server-side
svn:r3781
2005-03-19 04:38:59 +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
fd150459b3 Raise common code for "detach this stream and try it with a different circuit" into a separate function; make that function handle controller-managed streams right.
svn:r3756
2005-03-14 03:12:59 +00:00
Roger Dingledine
fe768d1d2a change SHUTDOWN_WAIT_LENGTH from a fixed 30 secs to a config option
svn:r3752
2005-03-12 20:13:38 +00:00
Nick Mathewson
115271f65e Implement the common case of ATTACHSTREAM.
svn:r3751
2005-03-12 04:22:01 +00:00
Nick Mathewson
777d3dde0c Get address map resetting implemented.
svn:r3745
2005-03-11 21:39:39 +00:00
Roger Dingledine
5254c4e63a remove duplicate function prototype
svn:r3743
2005-03-11 20:47:23 +00:00
Nick Mathewson
c185825585 Finish implementing GETINFO; make it easy to query address maps.
svn:r3732
2005-03-03 06:37:54 +00:00
Nick Mathewson
f90ccf5648 Implement new controller events for changed descriptors and new (not-yet-attached) streams.
svn:r3731
2005-03-02 22:29:58 +00:00
Nick Mathewson
5f8e2c2bc4 Rename unused-address functions to virtual address; this is more accurate. Also, include almost-right implementation of reusing dont-care mappings. (It is still kind of wrong because it does not take type into account.)
svn:r3728
2005-03-02 21:02:11 +00:00
Nick Mathewson
b494c2223d Specify and implement fragmented control messages to allow for (among other things) long GETINFO replies. Otherwise we could hit the 64K barrier on questions like "please dump your client-side DNS cache."
svn:r3726
2005-03-02 20:22:10 +00:00
Nick Mathewson
65230fd39f Implement "Dont-Care" from addresses to MapAddress control message. For safety, refuse to launch connections to unmapped addresses in the dont-care range.
svn:r3725
2005-03-02 19:26:46 +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
349ee1abea Clean up rend cache on shutdown
svn:r3714
2005-02-28 22:38:00 +00:00
Roger Dingledine
a1f1fa6ab2 Checkpoint in-progress fixes:
Add 'testing' circuit purpose, for reachability testing.
Notice when our IP changes, and reset stats.
Try to pull down a directory via Tor to see if our DirPort is working.
Try to extend a circuit back to us to see if our ORPort is working.
Only publish a descriptor if they're both reachable.

These mostly work, and I'd better get them in before I cause conflicts.


svn:r3703
2005-02-27 09:47:01 +00:00
Nick Mathewson
bbaa3c7792 Implement more control spec functionality
- Mapaddress
- Postdescriptor
- GetInfo on descriptors

Required changes elsewhere:
- Keep the most recent running_routers_t in the routerlist_t. That way we
  can learn about new routers and remember whether we were last told that
  they were up or down.  Also enables more simplifications.
- Keep the signed descriptor inside routerinfo_t.  This makes
  descriptor_entry_t in dirservers.c unneeded.
- Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun.
- Check addresses for plausibility before mapping them.


svn:r3696
2005-02-25 20:46:13 +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
Roger Dingledine
5b24ca6cde cache .exit address better (i think)
svn:r3684
2005-02-24 11:44:08 +00:00