Commit Graph

262 Commits

Author SHA1 Message Date
Nick Mathewson
3e2f889a29 Add an extra flush attempt when closing wedged dir conns, in an attempt to isolate the EPIPE bug
svn:r1848
2004-05-11 01:55:32 +00:00
Roger Dingledine
3cdf2d67da it's amazing what a bit of punctuation can do for appearances
svn:r1843
2004-05-10 10:27:54 +00:00
Nick Mathewson
81922a125c More doxygenation.
svn:r1832
2004-05-10 04:34:48 +00:00
Roger Dingledine
c6d4a00c5f more doxygen markup
plenty more remains


svn:r1824
2004-05-09 16:47:25 +00:00
Roger Dingledine
b384c5a18d bugfix: do directory_send_command only after we've established a socket
also many comments, cleaning, etc


svn:r1823
2004-05-09 16:33:04 +00:00
Roger Dingledine
9bf9ca4d09 bugfix: add a circ->resolving_streams field, and make dns resolving streams not actually in the connection_array until they're done resolving.
bugfix: actually complain if we duplicate mark-for-close a circuit

add more logging for relay ends that claim dns resolve failed, so we can
find out why they're not being retried.


svn:r1798
2004-05-06 11:08:04 +00:00
Nick Mathewson
e6477a8e16 Document the rest of main.c
svn:r1797
2004-05-05 21:35:12 +00:00
Nick Mathewson
682a805092 Comments for nearly all non-tricky files
svn:r1796
2004-05-05 21:32:43 +00:00
Nick Mathewson
2ba0776b02 Only connection_add connections once they have conn->s sett; refactor code around this. Should make stuff more bulletproof.
svn:r1788
2004-05-05 01:26:57 +00:00
Roger Dingledine
608c156820 must close marked connections at the end of run_scheduled_events.
otherwise they might have a socket -1, and if we leave them around
they'll muck up poll/select.

i think this was the cause of our win32 and os x fakepoll crashes,
and probably would cause other errors down the road.


svn:r1786
2004-05-05 00:59:42 +00:00
Nick Mathewson
af08c4f878 Working strerror for windows socket errors, plus some snide comments.
svn:r1775
2004-05-02 20:18:21 +00:00
Nick Mathewson
908ccb9dcd Handle windows socket errors correctly; comment most of common.
svn:r1756
2004-05-01 20:46:28 +00:00
Roger Dingledine
fff89216a9 tell us when we're rotating things
svn:r1712
2004-04-26 09:32:51 +00:00
Roger Dingledine
25d54257fb use tor_assert
remove obsolete BUF_OK macro


svn:r1697
2004-04-25 20:37:37 +00:00
Nick Mathewson
cb3897e5ab remove spurious router_rebuild_descriptor
svn:r1692
2004-04-25 19:01:49 +00:00
Roger Dingledine
0b31d0d4e8 more touch-ups
svn:r1687
2004-04-24 23:32:24 +00:00
Nick Mathewson
c44016e86e Merge flagday into main branch.
svn:r1683
2004-04-24 22:17:50 +00:00
Roger Dingledine
3c250a2fed only expire wedged dir conns that haven't already been expired
svn:r1676
2004-04-20 17:27:54 +00:00
Roger Dingledine
5cfec379ae expire wedged dir conns after 5min without write, not simply after 5min
svn:r1673
2004-04-19 20:08:42 +00:00
Roger Dingledine
d40e9f453f give wedged dir conns a last chance to flush
svn:r1671
2004-04-19 01:59:20 +00:00
Roger Dingledine
8d86f8abf5 reverse the logic, captain
svn:r1664
2004-04-18 06:42:13 +00:00
Roger Dingledine
7a7baf0552 expire dir connections that live for more than 5 minutes
svn:r1663
2004-04-18 06:35:31 +00:00
Roger Dingledine
01e594e512 clean up some warnings
svn:r1651
2004-04-17 06:34:20 +00:00
Nick Mathewson
baaf58fe1d only consider uploading descriptors every 5 sec
svn:r1612
2004-04-13 19:53:25 +00:00
Nick Mathewson
a2ece0fc08 Separate "start-establishing-introduction" from "upload descriptors"; only upload descriptors containing fully established intro points.
svn:r1607
2004-04-13 17:16:47 +00:00
Roger Dingledine
e0ce205a76 clean up circuit rebuilding some; fix some bugs we hadn't hit yet
svn:r1606
2004-04-13 05:20:52 +00:00
Roger Dingledine
f4ff5a75c1 break circuit_build_needed_circs into its own func
svn:r1596
2004-04-12 22:47:12 +00:00
Roger Dingledine
48e0228f1e expire old CIRCUIT_PURPOSE_C_REND_READY circs too
svn:r1585
2004-04-09 20:08:13 +00:00
Nick Mathewson
4e1b65f53d Dump introduction point status on kill -USR1
svn:r1584
2004-04-09 20:02:16 +00:00
Nick Mathewson
f9ade70cf9 Resolve init-services-in-do-hup issue
svn:r1583
2004-04-09 19:37:50 +00:00
Roger Dingledine
c80b42e17c don't call rend_services_init right before we fetch the
dir, because we call it right after now.


svn:r1582
2004-04-09 19:34:55 +00:00
Roger Dingledine
c5bef32d95 call directory_has_arrived has arrived every time we get
a new directory, not just the first time


svn:r1581
2004-04-09 19:30:38 +00:00
Nick Mathewson
c256f2c3a1 Make comment more sensible. Still uncertain about when to call rend_services_init, though.
svn:r1580
2004-04-09 17:54:20 +00:00
Nick Mathewson
facb5d4221 Reload rendezvous service keys on sighup; otherwise, we wind up with a
bunch of half-initialized services.  This should solve half of
weasel's current bug.  The crash is the other half.

(arma: should we also call rend_services_init on hup?)


svn:r1578
2004-04-09 17:48:09 +00:00
Roger Dingledine
4011906b6b get more serious about hunting The Bug
(it has been haunting us since the days of 0.0.2preX)


svn:r1576
2004-04-09 09:39:42 +00:00
Roger Dingledine
63cde97253 don't try to build intro circs until you've fetched the directory
svn:r1541
2004-04-07 22:48:06 +00:00
Nick Mathewson
4d14b786da Make sure we have our own keys before we initialize our routerlist
svn:r1535
2004-04-07 21:44:46 +00:00
Roger Dingledine
4df06ab5bb let bob replenish his intro points and republish service desc
as necessary


svn:r1528
2004-04-07 20:47:50 +00:00
Roger Dingledine
4a9587a486 we were uploading our server descriptor to each the dirservers
when we boot, and then also on the first iteration of the main loop


svn:r1520
2004-04-07 19:30:22 +00:00
Roger Dingledine
7793078dff alice can now look up bob's service descriptor,
choose an intro point, connect to it,
choose a rend point, connect to it and establish a cookie,
get an ack from the rendezvous point,
and know when both circs are ready for her.

APConns don't use conn->purpose anymore

don't initiate a renddesc lookup if one is already in progress

also fix a buffer overflow in nickname parsing (only exploitable
by the operator though)


svn:r1471
2004-04-05 00:47:48 +00:00
Roger Dingledine
4e996a4ce8 tabs
svn:r1456
2004-04-03 02:14:20 +00:00
Roger Dingledine
f34e6da3e7 now circuit_get_newest returns an appropriate circ for your purpose
connection_ap_handshake_attach_circuit attaches to a circ of the
right purpose

add a skeletal rendclient.c


svn:r1441
2004-04-02 22:23:15 +00:00
Roger Dingledine
64cb3a027f teach directory servers to handle renddesc responses
svn:r1434
2004-04-01 21:32:01 +00:00
Roger Dingledine
cc3c4245cb let the circuit-launcher choose the exit node (if he wants)
svn:r1428
2004-04-01 03:44:49 +00:00
Roger Dingledine
d01497cf3c outline what bob does to initialize his hidden services
let circuit_launch_new return the circ it just made


svn:r1424
2004-04-01 03:23:28 +00:00
Roger Dingledine
d13857a3f0 put in hooks for alice and bob logic when circuits finish/fail
let you specify the purpose of circuits you launch

bugfix: we used to be declaring the first successful circuit too                               early -- when the first hop finished. now we're more accurate.


svn:r1421
2004-04-01 01:57:22 +00:00
Roger Dingledine
ee45ae575d allow conns to demand to be attached to a clean circuit
(nobody uses this yet)


svn:r1417
2004-03-31 23:06:16 +00:00
Roger Dingledine
a0b0d16981 Add an ap_bridge function to do a socketpair and skip socks.
This allows us to do a directory connection *through* tor just
as if we're doing it as an application.

Make ap_conns tolerate it when the application sends stuff before
The socks handshake is done (it just buffers it).

Tell directory_initiate_command the length of the payload (because
it might include nuls).

Add a directory_has_arrived function to, for example, start building
the rendezvous service descriptor.


svn:r1412
2004-03-31 22:02:13 +00:00
Nick Mathewson
bf83b1e345 Add code to configure hidden services, parse configuration, generate keys and service IDs, and store/load them from disk
svn:r1410
2004-03-31 21:35:23 +00:00
Nick Mathewson
8fedefe6cb rename hidserv_xx
svn:r1406
2004-03-31 04:10:10 +00:00