Commit Graph

4157 Commits

Author SHA1 Message Date
Nick Mathewson
2bb5e64289 r12403@catbus: nickm | 2007-04-16 13:55:03 -0400
Code to generate extrainfo whenever routerdesc is regenerated; code to check extrainfo against routerdesc.


svn:r9970
2007-04-16 17:55:08 +00:00
Nick Mathewson
7fb7658a45 r12401@catbus: nickm | 2007-04-16 12:28:01 -0400
Enforce checks for number of arguments to items in directory objects more uniformly.


svn:r9968
2007-04-16 16:28:06 +00:00
Nick Mathewson
a67f8a3787 r12388@catbus: nickm | 2007-04-16 00:17:29 -0400
Now that the directory parser checks for missing items, the rest of the code can just assert that they are there, rather than checking a second time.


svn:r9966
2007-04-16 04:18:29 +00:00
Nick Mathewson
cf02ab6d39 r12387@catbus: nickm | 2007-04-16 00:06:40 -0400
Refactor router/directory parsing backend: use a separate token table for everything that we parse, and enforce the correct count of each item.


svn:r9965
2007-04-16 04:18:21 +00:00
Nick Mathewson
5b220f65c8 r12385@catbus: nickm | 2007-04-15 22:55:58 -0400
Initial code to parse extra-info documents as described in proposal 104.  This is making me realize that the parsing code in routerparse.c is a little daft.


svn:r9963
2007-04-16 04:17:58 +00:00
Nick Mathewson
795aa1a196 r12351@catbus: nickm | 2007-04-11 12:09:46 -0400
More autoconf hacking: use same machinery to find zlib as for openssl and libevent.  Have unified library finder include setup for --with  variable.  Start trying to suggest to the user what packages they should install if finding the library fails.


svn:r9945
2007-04-11 16:28:44 +00:00
Nick Mathewson
38a5f09502 r12349@catbus: nickm | 2007-04-11 09:18:15 -0400
Add code to shrink the cell memory pool by discarding empty chunks that have been empty for the last 60 seconds.  Also, instead of having test.c duplicate declarations for exposed functions, put them inside #ifdef foo_PRIVATE blocks in the headers.  This prevents bugs where test.c gets out of sync.


svn:r9944
2007-04-11 13:18:25 +00:00
Nick Mathewson
1c8f9b319b r12344@catbus: nickm | 2007-04-10 21:27:25 -0400
Fix documentation and usage of 2nd argument to mp_pool_new.


svn:r9942
2007-04-11 01:27:33 +00:00
Nick Mathewson
51e4b8d706 r12338@catbus: nickm | 2007-04-10 20:29:05 -0400
Document memory pool implementation, and tweak it even mor.  See? Programming is fun.


svn:r9940
2007-04-11 00:30:34 +00:00
Nick Mathewson
28de06b8e6 r12337@catbus: nickm | 2007-04-10 17:55:26 -0400
Add support for using memory pools to allocate queued cell; pass --disable-cell-pool to configure to disable this.


svn:r9939
2007-04-11 00:30:29 +00:00
Nick Mathewson
6ba0b0e9f4 r12336@catbus: nickm | 2007-04-10 17:34:25 -0400
Unit tests and debugging for memory pool implementation.


svn:r9938
2007-04-11 00:30:25 +00:00
Nick Mathewson
f95d232483 r12332@catbus: nickm | 2007-04-10 12:24:45 -0400
Yet another attempted Bug 411 fix: Under some circumstances, a circuit can have cells without being active.  The likeliest is that it has been unlinked from all connections in preparation for closing.  Therefore, stop enforcing this non-invariant.


svn:r9936
2007-04-10 16:24:50 +00:00
Nick Mathewson
58a6761056 r12330@catbus: nickm | 2007-04-09 19:15:42 -0400
Split type of "packed cell" from "parsed cell"; pack cells before queueing them on circuits.  This will help us avoid dumb errors when we confuse the two types.


svn:r9935
2007-04-09 23:15:46 +00:00
Nick Mathewson
7529c8f548 r12328@catbus: nickm | 2007-04-09 18:16:31 -0400
Argh, missed another 9030 bogon.


svn:r9934
2007-04-09 22:16:33 +00:00
Nick Mathewson
2a07919198 r12326@catbus: nickm | 2007-04-09 17:36:41 -0400
Clean up crap from 9930.  I can hardly wait till I trust SVK 2.x enough to upgrade.


svn:r9933
2007-04-09 21:36:45 +00:00
Nick Mathewson
2dc6019edb r12688@Kushana: nickm | 2007-04-09 17:29:12 -0400
Simplify dns_resolve: use a helper function so that we handle the error/answer/pending cases uniformly in dns_resolve, and everything else in dns_resolve_impl.


svn:r9932
2007-04-09 21:34:13 +00:00
Nick Mathewson
9c3df07b56 r12687@Kushana: nickm | 2007-04-09 17:05:57 -0400
Try to fix bug 410: move responsibility for attaching/detaching initial streams from circuits into dns_resolve.  Needs refactoring a little.


svn:r9931
2007-04-09 21:34:03 +00:00
Nick Mathewson
32506ad282 svn:r9930 2007-04-09 21:33:49 +00:00
Nick Mathewson
98e5d10761 r12318@catbus: nickm | 2007-04-09 16:08:20 -0400
Fix the first half of bug 411: when we make a circuit active inactive on a connection, it _must_ actually be on that connection.


svn:r9929
2007-04-09 20:09:28 +00:00
Nick Mathewson
eb95ff9ba9 r12317@catbus: nickm | 2007-04-09 15:50:51 -0400
Fix second part of bug 411 (which was actually a separate bug): it isnt safe to clear a cell queue while the circuit is active.


svn:r9928
2007-04-09 20:09:26 +00:00
Roger Dingledine
f36c613dbc fix a memory leak when we ask for "all" networkstatuses and
we get one we don't recognize.
backport candidate.
backbackport candidate.


svn:r9918
2007-03-29 07:02:12 +00:00
Nick Mathewson
6589ea2a2f Fix a crash bug in cell queues: It is possible for a connection_write_to_buf to close the connection or otherwise unlink the circuit, which makes the circuit nonactive, which invalidates the pointer from the circuit to the next circuit on the active ring. Also add a bunch of asserts, most #ifdefed out.
svn:r9915
2007-03-29 02:41:36 +00:00
Nick Mathewson
d1ad950ca8 Turn bool_neq and bool_eq into macros.
svn:r9914
2007-03-29 02:37:06 +00:00
Nick Mathewson
98ae4bbd0f Comment out the "clear queue when sending a destroy" logic: it seems potentially dangerous. (see comment for details)
svn:r9913
2007-03-29 02:32:00 +00:00
Nick Mathewson
a25c5d6994 r12654@Kushana: nickm | 2007-03-25 19:03:44 -0400
Add documentation for cell queue functions; make destroy cells result in cell queues getting cleared before the destroy gets sent.


svn:r9907
2007-03-26 14:08:35 +00:00
Nick Mathewson
83b2208ea4 r12653@Kushana: nickm | 2007-03-25 18:21:38 -0400
Add documentation for make_old argument to routerlist functions.


svn:r9906
2007-03-26 14:08:29 +00:00
Nick Mathewson
d1381aef82 r12652@Kushana: nickm | 2007-03-25 15:01:48 -0400
A surprisingly simple patch to stop reading on edge connections when their circuits get too full, and start again when they empty out.  This lets us remove the logic to block begin_dir conns when the corresponding or conns get full: it was already broken by cell queues anyway.


svn:r9905
2007-03-26 14:08:18 +00:00
Nick Mathewson
38c0bb3a99 r12651@Kushana: nickm | 2007-03-24 18:26:42 -0400
Initial version of circuit-based cell queues.  Instead of hammering or_conns with piles of cells, queue cells on their corresponding circuits, and append them to the or_conn as needed.  This seems to work so far, but needs a bit more work.  This will break the memory-use-limitation patch for begin_dir conns: the solution will be a fun but fiddly.


svn:r9904
2007-03-26 14:07:59 +00:00
Nick Mathewson
6e51bdd5e4 r12274@catbus: nickm | 2007-03-26 09:29:18 -0400
Possibly resolve bug reported by xiando.


svn:r9903
2007-03-26 13:30:17 +00:00
Nick Mathewson
da6bd21b72 r12644@0-41-wifi: nickm | 2007-03-23 16:02:23 -0400
Eliminate more redundant circuit_t arguments when edge_connection_t is already supplied and the circuit is already attached.


svn:r9900
2007-03-24 15:58:11 +00:00
Nick Mathewson
306d5400c3 r12643@0-41-wifi: nickm | 2007-03-23 14:56:35 -0400
Refactor a bunch of functions that take edge_connection_t not to also take a crypt_path_t; the cpath is implicit.


svn:r9899
2007-03-24 15:57:51 +00:00
Roger Dingledine
2cf63f8a62 Don't save non-general-purpose router descriptors to the disk cache,
because we have no way of remembering what their purpose was when
we restart.


svn:r9894
2007-03-21 15:37:30 +00:00
Roger Dingledine
c36a6210a2 put the stopgap on whether we've sent a create cell, not
whether we've attached a stream.


svn:r9883
2007-03-20 03:26:51 +00:00
Roger Dingledine
93e7627694 a stopgap measure while we wait for proposal 111: apply the
stricter rate limiting to all OR conns except those that have
been touched by local circuits.


svn:r9882
2007-03-20 03:21:51 +00:00
Roger Dingledine
b4f743562f Add a separate set of token buckets for relayed traffic. Right
now that's just defined as answers to directory requests.


svn:r9881
2007-03-20 02:55:31 +00:00
Roger Dingledine
4ab0b979b2 temporary hack to solve bug 384, so i can get on with debugging
other stuff.


svn:r9880
2007-03-20 02:10:18 +00:00
Roger Dingledine
0724bc113f correct a function comment that's become wrong
svn:r9879
2007-03-19 23:32:30 +00:00
Nick Mathewson
141efb86ff r12230@catbus: nickm | 2007-03-17 17:34:32 -0400
Remove some duplicated code in control.c: unify the "parse space-separated arguments and warn if there are too few" logic into a single helper function.


svn:r9866
2007-03-17 21:34:41 +00:00
Nick Mathewson
d787ef906a r12229@catbus: nickm | 2007-03-17 17:20:28 -0400
Add a warning when using obsolete "GUARDS" event.  Also, remove obsolete "if (1) {}"s from control.c: big patch, mostly just dedenting block contents.


svn:r9865
2007-03-17 21:34:37 +00:00
Roger Dingledine
75754b4d8e other minor fixes lurking in my sandbox
svn:r9854
2007-03-17 04:34:31 +00:00
Roger Dingledine
9d7dc1b37b forward-port r9850 and the changelogs
(it's a band)


svn:r9853
2007-03-17 04:32:04 +00:00
Roger Dingledine
4813ff04e8 Fix an infinite loop introduced in 0.1.2.7-alpha when we serve
directory information requested inside Tor connections (i.e. via
begin_dir cells). It only triggered when the same connection was
serving other data at the same time. Reported by seeess.

Backport candidate.


svn:r9841
2007-03-16 06:55:09 +00:00
Roger Dingledine
d374616301 clean up some minor typos and log confusions
svn:r9832
2007-03-15 22:47:21 +00:00
Nick Mathewson
e50e6b4e3c r12182@catbus: nickm | 2007-03-15 10:58:12 -0400
Clarify section of dir-spec.txt that explains how "v" resolution happens.


svn:r9829
2007-03-15 16:27:57 +00:00
Roger Dingledine
ad304a5cbb change my mind -- correct the spec to match the code's
behavior for getinfo addr-mappings/*. this is because
the code and spec have been mismatched since at least
0.1.1.x, so i would be surprised if nobody at all is
relying on the current behavior.

backport candidate.
backbackport candidate.


svn:r9823
2007-03-15 06:25:00 +00:00
Roger Dingledine
8ca31c8195 Make the response to 'getinfo addr-mappings/*' follow the spec.
svn:r9822
2007-03-15 06:10:58 +00:00
Roger Dingledine
c995a36972 typo in error message led to breaking the protocol. also
pointed out by daejees.


svn:r9819
2007-03-15 03:15:34 +00:00
Roger Dingledine
5b8adc7c9b Make 'getinfo fingerprint' return a 551 error if we're not a
server, so we match what the control spec claims we do. Reported
by daejees.


svn:r9818
2007-03-15 03:11:53 +00:00
Roger Dingledine
5740071674 the spec called it a GUARDS event, but the code called
it a GUARD event. standardize on GUARD, but support people
asking for GUARDS too. reported by daejees.

backport candidate.


svn:r9817
2007-03-14 23:50:41 +00:00
Roger Dingledine
bf3b3a44f3 Stop allowing hibernating servers to be "stable" or "fast".
This is what I meant to do in r9690 but didn't actually do.


svn:r9808
2007-03-13 01:59:09 +00:00