Commit Graph

231 Commits

Author SHA1 Message Date
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
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
bbbc063ed9 stop the circuit_receive_relay_cell warning
mark the circ for close if circuit_extend fails because the next
hop is not up yet; don't just return -1


svn:r1765
2004-05-02 03:32:00 +00:00
Nick Mathewson
ddb15b8f67 Remove IVs from cipher code, since AES-ctr has none.
svn:r1742
2004-04-28 20:31:32 +00:00
Nick Mathewson
7055f837ab Make Tor build on win32 with VC6 without warnings.
svn:r1739
2004-04-28 20:13:21 +00:00
Roger Dingledine
9965bd8387 make my assumption explicit
svn:r1730
2004-04-27 11:28:45 +00:00
Roger Dingledine
505bb2f4a0 it was the second bug that was nailing us.
periodically we expire some circuits if we already have
enough, and we were counting rend circs in that number.

(the first one wasn't a bug after all)


svn:r1729
2004-04-27 11:23:56 +00:00
Roger Dingledine
8e8af6aaee don't expire joined-rend circs that have an exit connection attached
and don't expire non-general excess circuits


svn:r1728
2004-04-27 10:16:31 +00:00
Nick Mathewson
f6dbe5a0d4 Refactor crypto error handling to be more like TLS error handling:
crypto_perror is a no-no, since an operation can set more than one
error.

Also, fix a bug in the unix crypto_seed_rng: mixing stdio with
/dev/urandom is a bad idea, since fopen can make all kinds of weird
extraneous syscalls (mmap, fcntl, stat64, etc.) and since fread tends
to buffer data in big chunks, thus depleting the entropy pool.


svn:r1717
2004-04-26 18:09:50 +00:00
Roger Dingledine
fb2279b90b since we don't support truncateds much, don't bother sending them;
just close the circ.

(this wasn't relevant before, because we were mis-handling destroys.)


svn:r1711
2004-04-26 04:32:01 +00:00
Roger Dingledine
bd38df8472 fix a bug that's been lurking since 27 may 03 (!)
when passing back a destroy cell, we would use the wrong circ id.
how the heck did this work?


svn:r1710
2004-04-26 03:42:41 +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
0fca143ea1 Remove onion_pkey from connection, since onion keys can change more often than connections. Also add more log messages
svn:r1693
2004-04-25 19:04:11 +00:00
Roger Dingledine
c4b72a254f tmp patch to also expire old clean rend_ready circs for now
will have to be fixed once we build-and-open rend circs preemptively


svn:r1668
2004-04-18 09:27:05 +00:00
Roger Dingledine
3fa2925a6a if an intro circ waiting for an ack dies before getting one, then
count it as a nack


svn:r1665
2004-04-18 07:37:16 +00:00
Roger Dingledine
65d507b980 log n_circ_ids when attaching rend streams
svn:r1657
2004-04-17 10:25:38 +00:00
Roger Dingledine
26dd5c68b0 a ! goes a long way toward more helpful debug messages
svn:r1656
2004-04-17 10:04:00 +00:00
Roger Dingledine
f5427463f5 more debugging to hunt for a bug
svn:r1647
2004-04-17 01:33:04 +00:00
Roger Dingledine
9c1470840f i was wrong about one of my invariants
now it's commented
this should fix asserts when you try an intro point, get a nack,
and try a second one and it works.


svn:r1637
2004-04-16 08:21:35 +00:00
Roger Dingledine
26c1c8f173 make unattached rend streams expire after a while (60s)
(they were darned persistent)

also make intro circs that are waiting for acks expire after a while (20s)


svn:r1628
2004-04-15 01:08:59 +00:00
Roger Dingledine
b51561f7fb prune abandoned circs better
add debugging info for the bug weasel found


svn:r1626
2004-04-14 23:52:29 +00:00
Nick Mathewson
37255d24bc Retry non-final-hop rendezvous failures
svn:r1625
2004-04-14 21:40:50 +00:00
Roger Dingledine
465f0e528a call circuit_build_failed() even when the failure is immediate
svn:r1617
2004-04-14 04:32:49 +00:00
Roger Dingledine
1d7979b460 let introcircs receive acks. rend streams now deal correctly again.
(i think)


svn:r1614
2004-04-13 22:56:24 +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
Nick Mathewson
8483bace65 Get the rest of intro-ack/nak handling in ... except for the tricky "pick a new intro and re-extend and re-try" part.
svn:r1601
2004-04-13 01:41:39 +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
Roger Dingledine
eb9f5a561e circuit-level sendmes weren't working, because the exit
thought it was an exit.

i overhauled the edge_type mechanism. hopefully this will help.


svn:r1570
2004-04-08 09:41:28 +00:00
Nick Mathewson
2a01e3ad10 Launch intro services after launching connections; allow ORs to build circuits through as-yet-unconnectd ORs
svn:r1562
2004-04-08 03:53:39 +00:00
Nick Mathewson
8351847afd Nothing is good enough for you, is it?
svn:r1556
2004-04-08 02:50:34 +00:00
Nick Mathewson
14e31fbd71 Use CIRCUIT_IS_ORIGIN in favor of boolean circ->cpath
svn:r1555
2004-04-08 02:24:06 +00:00
Roger Dingledine
ad2192c90f only call circuit_build_failed when we're circ's origin
svn:r1554
2004-04-08 02:22:26 +00:00
Nick Mathewson
60772ec90c Split out major functionality of circuit_get_best; rephrase a few booleans
svn:r1547
2004-04-08 01:55:21 +00:00
Roger Dingledine
93801ac40d don't pick myself or my twins as hops when building circuits
svn:r1531
2004-04-07 21:12:54 +00:00
Nick Mathewson
2633d353d7 Carefully increment failure counts when appropriate
svn:r1530
2004-04-07 20:59:38 +00:00
Roger Dingledine
505797e998 expire open-but-not-yet-acked circs if they're too old
svn:r1526
2004-04-07 20:38:23 +00:00
Roger Dingledine
650d483bea convince ourselves that circuit_failed doesn't have to be any smarter
svn:r1525
2004-04-07 20:23:59 +00:00
Nick Mathewson
3d60cd1d61 Delete trailing whitespace and expand tabs; remove unused aes decrypt code
svn:r1522
2004-04-07 19:57:40 +00:00
Roger Dingledine
3c683a9e7c let alice reuse recent rendjoin circs
svn:r1519
2004-04-07 19:22:55 +00:00
Roger Dingledine
cf67520e95 when counting how many being-built circs will handle a stream,
don't count ones that are too old


svn:r1517
2004-04-07 19:14:33 +00:00
Roger Dingledine
95f0e36f08 alice just fetched bob's hidden webpage.
yay.


svn:r1512
2004-04-06 21:52:01 +00:00
Roger Dingledine
d473cf7ee9 set the circ windows on the middle hop of the rend circs
svn:r1511
2004-04-06 21:25:11 +00:00
Roger Dingledine
5eca39cdb4 checkpoint commit: rend closer to working, still not there yet
svn:r1506
2004-04-06 20:25:18 +00:00
Nick Mathewson
6290d027c9 Continue attack on magic numbers; use new crypto wrappers where possible
svn:r1504
2004-04-06 20:16:12 +00:00
Roger Dingledine
2bb18e62cb make rend apconn send to the right cpath layer
and fix circuit_log_path to know about rend circs


svn:r1496
2004-04-05 22:01:35 +00:00
Nick Mathewson
b1a8b208ca Make init_cpath_crypto able to handle both sides of handshake, by adding a "reverse" flag
svn:r1489
2004-04-05 20:53:04 +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