Nick Mathewson
5985aef18a
Nth time is the charm on list manip.
...
svn:r1201
2004-03-03 01:37:54 +00:00
Roger Dingledine
4f6cf727b9
fix a pair of lurking segfaults
...
svn:r1198
2004-03-02 18:08:07 +00:00
Nick Mathewson
6f3c6d1289
Split out mark_for_close with circuits. Seems to work for me.
...
svn:r1197
2004-03-02 17:48:17 +00:00
Roger Dingledine
ef5f917e9e
print a statement when the first circ is finished,
...
so the user knows it's working
svn:r1179
2004-02-29 03:52:38 +00:00
Roger Dingledine
195ee8c845
create a separate connection_edge_destroy() function
...
svn:r1176
2004-02-29 00:11:37 +00:00
Roger Dingledine
dd632e697e
clean up some log messages and severities
...
still plenty more left to clean
svn:r1158
2004-02-28 07:01:22 +00:00
Roger Dingledine
3a1a6bb09e
if a relay cell is unrecognized at the end of the circuit,
...
send back a destroy
svn:r1153
2004-02-28 04:48:46 +00:00
Nick Mathewson
88e222ff76
Make has_sent_end irrelevant: only try to send end if reason is nonzero
...
svn:r1148
2004-02-28 03:06:31 +00:00
Roger Dingledine
611f117ce1
patches/answers to nick's commit
...
svn:r1146
2004-02-27 23:23:33 +00:00
Nick Mathewson
c5bbb571d2
Refactor mark_for_close, connection_edge_end and friends. Now, everybody
...
who wants to shut down a connection calls connection_mark_for_close instead
of setting marked_for_close to 1. This automatically removes the connection
from the DNS cache if needed, sends a RELAY END cell if appropriate, and can
be changed to do whatever else is needed.
Still to do:
- The same for circuits, maybe.
- Add some kind of hold_connection_open_until_flushed flag, maybe.
- Change stuff that closes connections with return -1 to use mark_for_close,
maybe.
svn:r1145
2004-02-27 22:00:26 +00:00
Roger Dingledine
1b3c197fad
clean up an ia64 warning
...
svn:r1140
2004-02-27 01:59:36 +00:00
Nick Mathewson
496e414e52
Basic RAM poisoning and magic-checking to notice connection and circuit
...
corruption faster; also, check for corruption in dns.c so we can fail fast
for the bug that's nailing Lucky and moria3.
svn:r1123
2004-02-25 07:31:46 +00:00
Roger Dingledine
3456adec31
adding the reattach-after-timeout feature wasn't so easy after all.
...
maybe it works now.
svn:r1101
2004-02-18 01:21:20 +00:00
Nick Mathewson
bd14023afd
Propagate yes/no/maybe a little farther forward.
...
svn:r1096
2004-02-17 08:29:22 +00:00
Roger Dingledine
afdaff63ef
turn some knobs, add more debugging
...
svn:r1023
2004-01-30 19:31:39 +00:00
Roger Dingledine
3516ae1a26
add an ap_conn connecting state; report connecting delay
...
svn:r1011
2004-01-20 09:21:46 +00:00
Roger Dingledine
53061b3778
fix endian issue: rh.integrity was getting sent wrong
...
now it's a char[4] rather than an int
svn:r966
2004-01-02 09:03:38 +00:00
Roger Dingledine
8085235e5f
make loglevel info less noisy
...
svn:r961
2003-12-30 22:49:35 +00:00
Roger Dingledine
f3fdbadfdf
randomize the initial circ_id and stream_id, so an adversary who
...
breaks in part-way through can't learn how many circs/streams have
been made
svn:r960
2003-12-28 04:46:09 +00:00
Roger Dingledine
71739b486a
back out the insert-padding-if-conflict code
...
use recognized + digest instead, just assume it's enough bits
svn:r959
2003-12-26 06:29:57 +00:00
Roger Dingledine
43fcb70bad
checkpoint: revamp relay cell packaging and handling
...
include the infrastructure for inserting padding cells when there's
a relay-recognized conflict, but it does not work currently.
svn:r958
2003-12-23 07:45:31 +00:00
Roger Dingledine
a5e6ec244f
rename circ_id_t to uint16_t for code clarity
...
change message when using non-recommended tor version
svn:r954
2003-12-19 19:55:02 +00:00
Roger Dingledine
45a66c6955
make a relay_header_t struct and pack/unpack funcs
...
split 7-byte stream_id string into 2-byte recognized and 2-byte stream_id
fix two seg faults in fetch_from_buf_http
fix several lurking seg faults in handling unexpected relay cells
still need to
* clean up relay_crypt
* use relay dummies if there's going to be a conflict with rh.recognized
* check for a conflict when generating stream_ids
svn:r953
2003-12-19 05:09:51 +00:00
Roger Dingledine
6a19e64066
remove trailing whitespace
...
svn:r951
2003-12-17 21:09:31 +00:00
Roger Dingledine
5ecd6b6bad
make fetch_from_buf_http malloc its strings rather
...
than use fixed-size strings
reorganize directory_handle_command so it'll be easier to do more with
our directory servers
svn:r950
2003-12-17 09:42:28 +00:00
Roger Dingledine
aba237e3e2
end-to-end integrity checking now works
...
initialize digests from shared secrets at handshake
make circuit_send_next_onion_skin use connection_edge_send_command
svn:r948
2003-12-17 05:58:30 +00:00
Roger Dingledine
21cc01299b
infrastructure for integrity-checks in relay cells
...
make circuit_consider_sending_sendme use connection_edge_send_command
fix endian bug in relay length handling (maybe)
svn:r946
2003-12-16 22:56:50 +00:00
Roger Dingledine
4e50f79b11
resolve an edge case in get_unique_circ_id_by_conn
...
svn:r944
2003-12-16 20:45:10 +00:00
Roger Dingledine
8712a30e91
move cell size to 512 bytes
...
move length to 2 bytes, put it in the relay header
remove 4 reserved bytes in cell
add 4 bytes to relay header for the integrity check
svn:r942
2003-12-16 09:48:17 +00:00
Roger Dingledine
961ecf7abf
add H(K|1) to the onionskin reply
...
verify it at the client end
abstract the onionskin handshake lengths
breaks backward compatibility (again)
svn:r941
2003-12-16 08:21:58 +00:00
Nick Mathewson
4885e90490
Make compile warning-free on cygwin
...
svn:r936
2003-12-15 21:35:52 +00:00
Roger Dingledine
08534a6271
start tracking the 'It appears I've already sent the end' warning
...
svn:r932
2003-12-14 08:32:14 +00:00
Roger Dingledine
05c05d6444
more friendly warning when there are too many dns workers
...
svn:r919
2003-12-14 04:19:12 +00:00
Roger Dingledine
7a3a3ae1df
bugfix: a circuit that immediately failed still counts as a failed circuit
...
svn:r905
2003-12-13 07:42:18 +00:00
Roger Dingledine
9c66e2bf9a
if >=2 circs are being built that handle a given stream,
...
no need to have new circs handle it too.
svn:r896
2003-12-12 23:03:25 +00:00
Roger Dingledine
38ce03d0e7
close the circuit when we get a truncated cell
...
svn:r893
2003-12-09 02:06:58 +00:00
Roger Dingledine
d172fdd300
fix vicious bug in connection_ap_attach_pending that caused it to
...
never work.
fix vicious bug in choose_good_exit_server that caused it to *skip over*
pending circuits, and look only at *non-pending circuits*, when choosing
a good exit node for the new circuit.
bugfix: remove incorrect asserts in circuit_get_newest()
svn:r876
2003-12-03 09:50:02 +00:00
Roger Dingledine
975bb68010
simplify: options.OnionRouter==1 iff options.ORPort>0
...
svn:r857
2003-11-20 17:49:45 +00:00
Roger Dingledine
f5994416c4
bugfix and cleanups
...
svn:r848
2003-11-19 13:12:43 +00:00
Nick Mathewson
fd07872a72
Separate failure-count tracking from circuit-launching.
...
Increment failure counts only when circuits close without having been built.
Reset failure counts only on the second, and when circuits are done building.
svn:r847
2003-11-19 02:22:52 +00:00
Roger Dingledine
25ac8857f3
bugfix: sometimes we closed a circ while cpuworker was cranking,
...
and it didn't notice
svn:r841
2003-11-18 21:12:17 +00:00
Roger Dingledine
f0cccc567e
bugfix: don't ask for ->next of an expired circuit
...
bugfix: keep going when a circ fails in circuit_n_conn_open
(make circuit_enumerate_by_naddr_nport obsolete)
bugfix: make circuit_n_conn_open only look at circ's that start at us
bugfix: only try circuit_n_conn_open if we're an OP. Otherwise we
expect connections to always already be up.
bugfix: when choosing path length, pay attention to whether the directory
says a router is down.
bugfix: when picking good exit, skip routers which are known to be down
(more work needs to be done on this one)
svn:r838
2003-11-18 09:53:03 +00:00
Roger Dingledine
ac56486bf6
use the tor_malloc_zero wrapper
...
svn:r837
2003-11-18 08:20:19 +00:00
Roger Dingledine
a3e39b0ceb
don't build too many circs at once
...
expire circs that have been building for too long
svn:r835
2003-11-18 07:48:00 +00:00
Nick Mathewson
4eabb8450e
Fix possible bug in circID selection when building circuits on combination OP/OR servers
...
svn:r830
2003-11-17 18:40:56 +00:00
Roger Dingledine
7a702d64d4
more verbose info for circuits when kill -USR1
...
svn:r829
2003-11-17 09:30:29 +00:00
Roger Dingledine
a18ced652b
finally find and possibly fix the circuit_deliver_relay_cell warn bug
...
svn:r827
2003-11-17 07:43:03 +00:00
Roger Dingledine
42b5ed754f
catch the last missing log line i hope
...
svn:r825
2003-11-17 07:29:43 +00:00
Nick Mathewson
90e143e6d4
Remove a possible source of error in circID picking.
...
svn:r824
2003-11-17 07:24:01 +00:00
Roger Dingledine
e5d6e7db1a
continue the circuit_deliver_relay_cell forward-failure bughunt
...
svn:r823
2003-11-17 07:20:51 +00:00