Commit Graph

113 Commits

Author SHA1 Message Date
Roger Dingledine
35bd6caa1a Fix crash with "tor --list-fingerprint" (reported by seeess).
svn:r9328
2007-01-10 23:48:24 +00:00
Nick Mathewson
31e274ddd3 r9461@Kushana: nickm | 2006-10-31 20:30:12 -0500
Oops. Fix compile error in last build.


svn:r8888
2006-11-01 01:30:25 +00:00
Nick Mathewson
9e13a6f31c r9457@Kushana: nickm | 2006-10-31 18:35:17 -0500
Do not warn when an OR gives us a new circuit end reason. (This will prevent bug 351 from recurring.)


svn:r8887
2006-10-31 23:35:50 +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
bfdb93d8bd r9272@Kushana: nickm | 2006-10-19 12:52:37 -0400
Fix an XXX in handling destroy cells: when we get a destroy cell with reason FOO, do not tell the controller REASON=FOO.  Instead, say REASON=DESTROYED REMOTE_REASON=FOO. Suggested by a conversation with Mike Perry.


svn:r8760
2006-10-19 23:04:49 +00:00
Nick Mathewson
b713b370bf r9060@totoro: nickm | 2006-10-17 11:12:48 -0400
Apply patch from Mike Perry: add more reasons for circuit destroys. (Slightly tweaked to avoid allocating a number for an "internal" reason.)


svn:r8739
2006-10-17 15:20:00 +00:00
Nick Mathewson
26283e69ba r8973@totoro: nickm | 2006-10-09 11:45:47 -0400
Touch up last patch (to add REASON to CIRC events): make some reasons
 more sensible, send reasons only to controllers that have enabled
 extended events, and clean up whitespace.
 
 


svn:r8672
2006-10-09 15:47:50 +00:00
Nick Mathewson
b76fd968b4 r8972@totoro: nickm | 2006-10-09 10:36:22 -0400
Patch from Mike Perry: add a REASON field to closed and failed circ events.


svn:r8671
2006-10-09 15:47:27 +00:00
Roger Dingledine
604b13c910 remove some old debugging code
svn:r8657
2006-10-08 23:20:43 +00:00
Nick Mathewson
ce72a9914e r8822@totoro: nickm | 2006-10-01 16:24:22 -0400
Fix bug 303: reject attempts to use Tor as a one-hop proxy.


svn:r8566
2006-10-01 20:50:11 +00:00
Roger Dingledine
c22dc94fe6 make my bandwidth exercises actually happen
svn:r8400
2006-09-15 05:53:00 +00:00
Roger Dingledine
769f9201a6 Send out a burst of long-range drop cells after we've established that
we're reachable. Spread them over 4 circuits, so hopefully a few will
be fast. This exercises our bandwidth and bootstraps us quicker.


svn:r8399
2006-09-15 05:30:25 +00:00
Roger Dingledine
798b580695 fix assert found by DreadWingKnight: now that rendezvous streams
are attached to p_streams, the p_streams list can consist of both AP
and EXIT conns.


svn:r6945
2006-07-30 04:54:13 +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
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
Nick Mathewson
e61d28dfb8 r6903@Kushana: nickm | 2006-07-25 18:22:48 -0400
No circuit can be both an intro point and a rend point, so we can merge both the cookie and the pk digest into one "rend_token" field for or circuits. This saves another 20 bytes per or circuit.


svn:r6904
2006-07-26 19:05:41 +00:00
Nick Mathewson
a88ec48a39 r6902@Kushana: nickm | 2006-07-25 17:30:27 -0400
Move rend_query to origin_circuit_t where it belongs; save another 17 bytes per OR circuit.


svn:r6903
2006-07-26 19:05:34 +00:00
Nick Mathewson
d27cbf5d4b Fix another segfault in assert_circuit_ok.
svn:r6818
2006-07-23 08:13:45 +00:00
Nick Mathewson
7239262f71 Don't tell anybody, but we're going OO here. This patch splits
circuit_t into origin_circuit_t and or_circuit_t.  I fixed some
segaults; there may be more.  We still need to move more rendezvous
stuff into subtypes.

This is a trial run for splitting up connection_t; if the approach is
insane, please say so soon so we can do something smarter.

Also, this discards the old HALF_OPEN code, which nobody seems to
want.


svn:r6817
2006-07-23 07:37:35 +00:00
Roger Dingledine
453062b028 fix typo, remove extraneous variable
svn:r6311
2006-04-03 11:24:14 +00:00
Roger Dingledine
36484f873a convert some more source files to the new log convention
svn:r6002
2006-02-13 08:28:42 +00:00
Roger Dingledine
5f051574d5 Happy new year!
svn:r5949
2006-02-09 05:46:49 +00:00
Roger Dingledine
2c221dd8db fix bug 245: When modifying the orconn_circid_map map, we would
sometimes decrement conn->n_circuits even when there was no circuit
originally. This caused conn->n_circuits to go negative.

We noticed this because we were checking if connections can be
closed based on conn->n_circuits == 0, so we were never closing
any connection that had ever had a circuit on it.


svn:r5931
2006-02-09 02:42:15 +00:00
Nick Mathewson
878962bee1 Add reasons to DESTROY and RELAY_TRUNCATED cells.
svn:r5734
2006-01-05 21:23:03 +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
Nick Mathewson
7e632a7564 another possible patch related to circuit_free and memory stomping.
svn:r5580
2005-12-14 18:55:17 +00:00
Roger Dingledine
c9f6e6b0a0 sometimes, when we just started tor, we haven't created that
smartlist yet. so don't free it.


svn:r5577
2005-12-14 00:52:15 +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
2d585941b8 Release memory from conn_circid_circuit_map on exit.
svn:r5535
2005-12-08 19:46:22 +00:00
Nick Mathewson
d2123388ad Better fix for last bug: avoids trying to double-mark circuits.
svn:r5511
2005-12-05 19:45:54 +00:00
Nick Mathewson
fedc9c8a60 We were neglecting to unlink marked circuits from soon-to-close OR connections.
svn:r5510
2005-12-05 19:26:09 +00:00
Nick Mathewson
f0abb1a74b Check magic when removing old connection from map.
svn:r5508
2005-12-05 19:01:34 +00:00
Nick Mathewson
1b0134dda8 Clean up some comments; remove some dead code
svn:r5493
2005-12-03 16:32:29 +00:00
Nick Mathewson
979fc3e69d cvs diff -u src/or/circuitlist.c | less almost never does what you want in C.
svn:r5491
2005-12-03 03:36:32 +00:00
Nick Mathewson
77a494dd55 Expunge remaining places where we used "tree" to mean "associative array".
svn:r5490
2005-12-03 02:21:31 +00:00
Nick Mathewson
148a1e969d Shave off another 4.7%: remove a linear search when figuring out which circuits wanted us to open a given OR connection.
svn:r5489
2005-12-03 02:12:37 +00:00
Roger Dingledine
1da454a42d when returning a list of circuits, don't return a list of the same
conn over and over. that's really bad for memory.


svn:r5463
2005-11-28 02:52:17 +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
Roger Dingledine
fe221f3dff Start the process of treating internal circuits and exit circuits
separately. It's important to keep them separate because internal
circuits have their last hops picked like middle hops, rather than like
exit hops. So exiting on them will break the user's expectations.

- Stop cannibalizing internal circuits for general exits, and stop
  cannibalizing exit circuits for rendezvous stuff.

- Don't let new exit streams attach to internal circuits.

- When deciding if we have enough circuits for internal and for exit,
  don't count the wrong ones.

- Treat predicted resolves as predicted port 80 exits.


svn:r5457
2005-11-25 08:08:56 +00:00
Nick Mathewson
a39269572f Replace balanced trees with hash tables: this should make stuff significantly faster.
svn:r5441
2005-11-23 04:18:45 +00:00
Roger Dingledine
700c370a3b misc cleanups
svn:r5428
2005-11-19 01:56:58 +00:00
Roger Dingledine
409294153f remove some redundant (and misleading) code
svn:r5425
2005-11-19 00:44:24 +00:00
Roger Dingledine
a3c53e0af9 speed up the lookup-by-circid-orconn now that it seems that
our code works.


svn:r5358
2005-11-11 19:28:32 +00:00
Roger Dingledine
862a997495 when we were cannibalizing a circuit with a particular exit
node in mind, we weren't checking to see if that exit node
was already present earlier in the circuit. oops.


svn:r5357
2005-11-11 19:25:30 +00:00
Roger Dingledine
44b3f3060a make circ->onionskin a pointer, not a static array. moria2 was using
125000 circuit_t's after it had been up for a few weeks, which translates
to 20+ megs of wasted space.


svn:r5333
2005-10-29 19:13:48 +00:00
Nick Mathewson
5d85560d9e Remove last vestiges of old logging interface.
svn:r5317
2005-10-25 18:01:01 +00:00
Nick Mathewson
a38aa81bf8 fix another segv, this time in circid fix.
svn:r5312
2005-10-25 15:31:25 +00:00
Nick Mathewson
932106f54c Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
svn:r5309
2005-10-25 07:05:03 +00:00
Nick Mathewson
fa338d85db Fix one possible source of reuse-a-circuit-id bug; convert circuitbuild to new logging
svn:r5301
2005-10-24 19:37:45 +00:00