Commit Graph

4183 Commits

Author SHA1 Message Date
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
Nick Mathewson
6363a7ccf5 r12538@Kushana: nickm | 2007-03-11 17:10:22 -0400
Fix a lame assert, I hope.


svn:r9801
2007-03-11 21:10:54 +00:00
Roger Dingledine
7fedd6ab4e best not to introduce new technical terms if we don't need to
svn:r9800
2007-03-11 20:52:07 +00:00
Nick Mathewson
98c3403ce7 r12535@Kushana: nickm | 2007-03-11 16:34:40 -0400
Fix a comment and add a couple of  assert to try to track down another assert in routerlist_assert_ok()


svn:r9799
2007-03-11 20:34:44 +00:00
Nick Mathewson
97b61b9889 r12519@Kushana: nickm | 2007-03-10 00:57:01 -0500
Remove a redundant check for event.h; add some comments, and reformat.


svn:r9790
2007-03-10 07:38:42 +00:00
Roger Dingledine
4ca75ecc49 holy cow, those windows unames are long. don't distract so
much from the important part of this log message.


svn:r9789
2007-03-10 06:33:44 +00:00
Roger Dingledine
a247792169 Directory authorities now call routers stable if they have an
uptime of at least 30 days, even if that's not the median uptime
in the network. Implements proposal 1xx, suggested by Kevin Bauer
and Damon McCoy.


svn:r9788
2007-03-10 05:43:35 +00:00
Nick Mathewson
02ce8e6b12 r12474@Kushana: nickm | 2007-03-06 16:10:05 -0500
We have a PATH_SEPARATOR macro.  How about we use it?


svn:r9782
2007-03-09 21:39:30 +00:00
Roger Dingledine
fe94914b98 Put a platform string (e.g. "Linux i686") in the startup log
message, so when people paste just their logs, we know if it's
openbsd or windows or what.


svn:r9775
2007-03-09 08:56:39 +00:00
Roger Dingledine
b97dca4510 forward-port the bugfix from juliusz
svn:r9772
2007-03-09 08:48:53 +00:00
Roger Dingledine
064ff7b33d get rid of an info-level log message that occurs many times a
minute when we haven't needed circuits lately.


svn:r9771
2007-03-09 08:48:21 +00:00
Nick Mathewson
2036470b62 r12098@catbus: nickm | 2007-03-06 18:48:50 -0500
Try to make unit tests happier on 64-bit platforms.


svn:r9752
2007-03-06 23:48:55 +00:00
Nick Mathewson
5d1bee87ff r12468@Kushana: nickm | 2007-03-06 15:24:00 -0500
More unit tests: gcov is fun.


svn:r9748
2007-03-06 20:25:44 +00:00
Nick Mathewson
c9e2766e75 r12461@Kushana: nickm | 2007-03-06 13:26:17 -0500
More autoconf fixes and updates. Maybe the bsd buildbots will be happy again.


svn:r9747
2007-03-06 20:25:32 +00:00
Roger Dingledine
78cbfcf651 and one more not-really-an-error case
svn:r9743
2007-03-06 19:37:18 +00:00
Roger Dingledine
5217d3680e clean up a log message, and stop calling it an error when
we exit cleanly


svn:r9742
2007-03-06 19:33:43 +00:00
Nick Mathewson
52713788b4 r12080@catbus: nickm | 2007-03-04 21:40:55 -0500
Remove dnsworkers and related code. there goes another 550 lines of code.


svn:r9736
2007-03-05 02:40:58 +00:00
Nick Mathewson
92f62b3684 r12077@catbus: nickm | 2007-03-04 16:08:23 -0500
Remove support for v0 control protocol from 0.2.0.x trunk; send back error when we receive a v0 control message.  (Leave "if(v1){...}"blocks indented for now so this patch is easier to read.)  ((Finally, the linecount goes _down_ a little.))


svn:r9735
2007-03-04 21:08:28 +00:00
Nick Mathewson
7fcceb2c25 r12074@catbus: nickm | 2007-03-04 15:11:43 -0500
Make all LD_BUG log messsages get prefixed with "Bug: ".  Remove manually-generated "Bug: "s from log-messages.  (Apparently, we remembered to add them about 40% of the time.)


svn:r9733
2007-03-04 20:11:46 +00:00
Nick Mathewson
70e5a83a77 r12057@catbus: nickm | 2007-03-04 13:58:32 -0500
Clarify some log messages; note others that could be improved later.


svn:r9724
2007-03-04 18:58:38 +00:00
Nick Mathewson
5f9f62daa2 r12053@catbus: nickm | 2007-03-03 16:45:38 -0500
Remove some XXX012s: leave a check in connection_or_set_identity_digest it costs basically nothing to do on average.  Forget about reinstating the user check on NT Service creation.  Note that a notice message in main.c ("Is something wrong with your network connection?") is really useless.


svn:r9721
2007-03-03 21:55:31 +00:00
Nick Mathewson
25508347ec r12051@catbus: nickm | 2007-03-03 16:15:52 -0500
nt_service_is_stopping should not load the NT service library calls: if they are not loaded, we cannot possibly be a service trying to shut own.  Bug found by "norvid" on or-talk.  Also, rename function to something slightly less error-prone.


svn:r9720
2007-03-03 21:16:07 +00:00
Roger Dingledine
6b191f854c resolve another xxx012
svn:r9701
2007-03-01 04:40:43 +00:00
Roger Dingledine
dba4e040fc Disable encrypted directory connections when we don't have a server
descriptor for the destination. We'll get this working again in
the 0.2.0 branch.


svn:r9700
2007-03-01 04:26:30 +00:00
Roger Dingledine
a46bd9942d bonus points if it builds on 64 bit
svn:r9698
2007-03-01 03:59:28 +00:00
Roger Dingledine
b0aaa88433 make the prefertunnel stuff less obviously broken
svn:r9697
2007-03-01 03:56:21 +00:00
Nick Mathewson
2780bb74c8 r12014@catbus: nickm | 2007-02-28 19:41:20 -0500
Niels has accepted the patch from Scott Lamb to implement better signal handling: I can take "get the pthread_sigprocmask situation under control" off my plate.


svn:r9696
2007-03-01 00:41:35 +00:00
Nick Mathewson
df5a8aa931 r12013@catbus: nickm | 2007-02-28 18:26:13 -0500
Note a piece of code that needs to get resolved, before we forget it.


svn:r9695
2007-03-01 00:41:33 +00:00
Nick Mathewson
11d89141ac r12012@catbus: nickm | 2007-02-28 18:25:18 -0500
Twiddle constants wrt uploading hidden service descriptors.


svn:r9694
2007-03-01 00:41:28 +00:00
Roger Dingledine
b78f67dbf5 - Stop calling servers that have been hibernating for a long time
"stable". Also, stop letting hibernating or obsolete servers affect 
  uptime and bandwidth cutoffs.
- Stop listing hibernating servers in the v1 directory.


svn:r9690
2007-02-28 21:06:05 +00:00
Roger Dingledine
9fd669c339 note another wishlist item for the arma
svn:r9689
2007-02-28 20:49:09 +00:00
Nick Mathewson
f38240435a r12001@catbus: nickm | 2007-02-28 15:24:12 -0500
Try to build without warnings on mingw with verbose warnings on.  First attempt.


svn:r9688
2007-02-28 20:24:27 +00:00
Nick Mathewson
3008c3b768 r12000@catbus: nickm | 2007-02-28 15:12:21 -0500
Try to fix eventdns bug 326 again, this time by noting that rcode 2 (serverfailed) does not really mean "The server is useless."


svn:r9687
2007-02-28 20:24:23 +00:00
Roger Dingledine
08c75f4349 avoid a few headaches
svn:r9686
2007-02-28 20:24:09 +00:00
Nick Mathewson
2ee2e63631 r11996@catbus: nickm | 2007-02-28 13:52:48 -0500
Add an MSC_VER check I missed.


svn:r9684
2007-02-28 18:52:57 +00:00
Nick Mathewson
deef370a1c r11987@catbus: nickm | 2007-02-28 12:34:04 -0500
add another u64-related unit test.


svn:r9681
2007-02-28 17:34:07 +00:00
Nick Mathewson
c8659db28d r11982@catbus: nickm | 2007-02-28 11:55:41 -0500
Add unit tests for tor_parse_uint64


svn:r9678
2007-02-28 16:56:28 +00:00
Nick Mathewson
dae5fc7982 r11981@catbus: nickm | 2007-02-28 11:55:27 -0500
Clamp declarable bandwidth at INT32_MAX, not INT_MAX.


svn:r9677
2007-02-28 16:56:07 +00:00
Nick Mathewson
d6368fd075 r11976@catbus: nickm | 2007-02-27 19:35:59 -0500
Add some missing (redundant but helpful in most cases) static declarations, and remove a function nobody was calling.


svn:r9672
2007-02-28 00:36:03 +00:00
Nick Mathewson
1a3e1c5510 r11970@catbus: nickm | 2007-02-27 19:17:27 -0500
Fix a bug found by Udo van den Heuvel: avoid an assertion failure when a controller sets and clears EntryNodes before the next call to choose_random_entry().  Also make a function static.


svn:r9669
2007-02-28 00:23:05 +00:00
Nick Mathewson
4d127acb53 r11958@catbus: nickm | 2007-02-26 22:28:03 -0500
Add a missing set to onion_key_set_at to avoid premature rotates.


svn:r9662
2007-02-27 03:53:40 +00:00
Nick Mathewson
82e2d6001a r11954@catbus: nickm | 2007-02-26 13:01:19 -0500
Note some optimizations that are probably not worth it for 0.1.2.x based on preliminary profiling.


svn:r9659
2007-02-26 18:01:23 +00:00
Roger Dingledine
522a97098b more cleanups; getting closer
svn:r9655
2007-02-26 05:36:02 +00:00
Roger Dingledine
9e44449946 fix a bug in our logic, but point out that maybe it's moot
svn:r9654
2007-02-26 05:33:17 +00:00
Nick Mathewson
333bf44471 r11944@catbus: nickm | 2007-02-25 14:43:18 -0500
Add a lower-bound on MaxAdvertisedBandwidth.


svn:r9652
2007-02-25 19:43:23 +00:00
Nick Mathewson
938de88e3b r11942@catbus: nickm | 2007-02-25 11:22:12 -0500
Fix connection_get_by_type_state_rendquery(): This has been bogus for most of 0.1.2.x.  Thanks to Karsten Loesing for finding the bug; fixes bug 399.


svn:r9651
2007-02-25 16:22:36 +00:00
Roger Dingledine
5fd4f7c131 the other half of r9572, suggested by seeess: when we receive
a v1 dir or rr that is too old, don't even cache it.


svn:r9649
2007-02-25 03:43:00 +00:00
Nick Mathewson
dde4bc1fd3 r11933@catbus: nickm | 2007-02-24 18:55:33 -0500
Fix a bug in 9572: after we decref a defunct v1 directory, drop the main reference to it.  Should fix bug 396.  Many thanks to seeess for tracking this one down.


svn:r9648
2007-02-24 23:55:36 +00:00
Roger Dingledine
d6c21ab8a7 tell the user if we're delaying his newnym request. also, pick
a different set of fenceposts.


svn:r9647
2007-02-24 21:21:38 +00:00
Nick Mathewson
af57074f08 r11931@catbus: nickm | 2007-02-24 15:28:34 -0500
crank up the length of the maximum allowed control message.


svn:r9644
2007-02-24 20:28:41 +00:00
Nick Mathewson
b4243d7dfa r11929@catbus: nickm | 2007-02-24 15:02:43 -0500
Split possibly long log line.


svn:r9643
2007-02-24 20:02:47 +00:00
Nick Mathewson
501659e67c r11927@catbus: nickm | 2007-02-24 14:49:31 -0500
Make sure every error case of router_dump_router_to_string warns about what actually went wrong.


svn:r9642
2007-02-24 19:49:35 +00:00
Roger Dingledine
fc81b71055 if we can't read bandwidthrate, at least tell us what it was.
svn:r9640
2007-02-24 19:29:42 +00:00
Nick Mathewson
cc64d1f111 r11917@catbus: nickm | 2007-02-24 03:18:52 -0500
Fix another XXX012 in eventdns.c: tell the DNS request about malformed DNS replies.


svn:r9637
2007-02-24 08:18:59 +00:00
Roger Dingledine
50f22e858a doc pedant
svn:r9634
2007-02-24 07:50:38 +00:00
Nick Mathewson
f599adf40a r11909@catbus: nickm | 2007-02-24 02:37:40 -0500
Move tricky "delete the member of the smartlist currently under iteration" logic into its own happyfun macro.


svn:r9633
2007-02-24 07:37:45 +00:00
Roger Dingledine
2015479b5a fix crash introduced in r9622
svn:r9632
2007-02-24 06:44:40 +00:00
Roger Dingledine
748c502e3a fix a log message that was broken long ago and never noticed
svn:r9630
2007-02-24 05:36:45 +00:00
Roger Dingledine
d63c58249e make it stop crashing when i exercise the new entrynodes behavior in
r9574. this hack is getting pretty darn hackish; perhaps it's time to
not use SMARTLIST_FOREACH in this situation.


svn:r9629
2007-02-24 04:17:29 +00:00
Roger Dingledine
33430d3a9e bugfix on r9568: we were throwing around an uninitialized
nickname array, and only treating a server as reachable if
the array magically has the right nickname in it. this was
causing the authorities to label only themselves as running,
and clients were "mysteriously" failing.


svn:r9628
2007-02-24 01:26:09 +00:00
Roger Dingledine
9946bb7fbd cosmetic, comment, and todo fixes
svn:r9627
2007-02-24 01:12:53 +00:00
Nick Mathewson
4e05ccb289 r11900@catbus: nickm | 2007-02-23 18:11:04 -0500
Fix null-pointer access on update_router_descriptor_cache_downloads.


svn:r9626
2007-02-23 23:11:08 +00:00
Nick Mathewson
ddc34f6037 r11898@catbus: nickm | 2007-02-23 16:55:43 -0500
Two XXX012 comments turned out to be bogus; remove them and document why.


svn:r9625
2007-02-23 21:56:10 +00:00
Nick Mathewson
55cbbdf9bf r11895@catbus: nickm | 2007-02-23 15:12:58 -0500
Make remap stream events have a souce; make them generated every time we get a successful connected or resolved cell.  Also change reported stream target address to IP consistently when we get the IP from an exit node.


svn:r9624
2007-02-23 20:13:02 +00:00
Nick Mathewson
f1d207b29a r11885@catbus: nickm | 2007-02-23 13:34:24 -0500
Fix an XXXX012: make entry guards _really_ get retried when the network comes back online.


svn:r9622
2007-02-23 18:34:35 +00:00
Nick Mathewson
a98efbf285 r11877@catbus: nickm | 2007-02-22 02:24:50 -0500
Fix doc about when circuit_build_needed_circs() is called. Resolves another xxxx012.


svn:r9617
2007-02-22 07:41:14 +00:00
Nick Mathewson
a2a52b4d5f r11876@catbus: nickm | 2007-02-22 02:23:13 -0500
Fix two XXXX012 issues in routerlist.c: a possible performance issue hasnt shown up on any profiles, so unflag it.  Stop warning when we get a router descriptor that we asked for but no longer want: just drop it (if we are not a cache) or cache if (if we are).


svn:r9616
2007-02-22 07:41:10 +00:00
Nick Mathewson
b3392559d4 r11873@catbus: nickm | 2007-02-22 01:21:14 -0500
twiddle signewnym rate-limiting patch so every signal gets handled eventually.  document it in control-spec. add a changelog.


svn:r9615
2007-02-22 06:21:19 +00:00
Nick Mathewson
fe9224dabc r11872@catbus: nickm | 2007-02-22 01:08:46 -0500
patch from mwenge: rate-limit newnym.


svn:r9614
2007-02-22 06:21:16 +00:00
Nick Mathewson
809a4daa52 r11859@catbus: nickm | 2007-02-21 00:53:27 -0500
Fix use of predict. this should get refactored, but now now.


svn:r9611
2007-02-21 05:57:08 +00:00
Nick Mathewson
2a4fc8533c r11858@catbus: nickm | 2007-02-21 00:27:44 -0500
As a trivial optimization, remove a redundant call to router_have_minimum_dir_info.  This might shave 2% on some systems by according to some profilers.


svn:r9610
2007-02-21 05:56:53 +00:00
Nick Mathewson
aade1b9204 r11844@catbus: nickm | 2007-02-17 16:53:42 -0500
Note a problematic warning.


svn:r9599
2007-02-17 23:49:50 +00:00
Nick Mathewson
d2893398f6 r11832@catbus: nickm | 2007-02-16 15:31:59 -0500
Fix 35 remaining DOCDOC comments. Yowza.


svn:r9596
2007-02-16 20:39:37 +00:00
Nick Mathewson
a3ec172e1a r11827@catbus: nickm | 2007-02-16 15:00:39 -0500
Try to fix VC++ int conversion warning.


svn:r9595
2007-02-16 20:01:21 +00:00
Nick Mathewson
11e5656ab7 r11826@catbus: nickm | 2007-02-16 14:58:38 -0500
Resolve 56 DOCDOC comments.


svn:r9594
2007-02-16 20:01:02 +00:00