Commit Graph

840 Commits

Author SHA1 Message Date
Nick Mathewson
ec6c131da6 r17936@catbus: nickm | 2008-02-06 00:31:11 -0500
Fix/downgrade some more XXX020s.


svn:r13397
2008-02-06 05:31:21 +00:00
Nick Mathewson
c8a689c9e8 r17909@catbus: nickm | 2008-02-05 14:48:22 -0500
As planned, rename networkstatus_vote_t to networkstatus_t, now that v3 networkstatuses are working and standard and v2 networkstatuses are obsolete.


svn:r13383
2008-02-05 21:39:29 +00:00
Nick Mathewson
f013fb5e31 r17854@catbus: nickm | 2008-01-30 17:52:43 -0500
Periodically check whether we have an expired consensus networkstatus.  If we do, and we think we have enough directory info, then call router_dir_info_changed().  Fixes bug 401.  This bug was deferred from 0.1.2.x, but fixing it there is nontrivial.


svn:r13342
2008-01-30 22:52:46 +00:00
Roger Dingledine
b79850d574 Make "ClientOnly 1" config option disable directory ports too.
svn:r13213
2008-01-21 21:00:50 +00:00
Roger Dingledine
7dde7b02a2 try to grow a convention about where we put the time_to_foo and
FOO_INTERVAL declarations.


svn:r13177
2008-01-18 05:00:35 +00:00
Roger Dingledine
43dce232ad If we've gone 12 hours since our last bandwidth check, and we
estimate we have less than 50KB bandwidth capacity but we could
handle more, do another bandwidth test.


svn:r13176
2008-01-18 04:58:40 +00:00
Nick Mathewson
c0ec281565 r15784@tombo: nickm | 2008-01-02 00:38:06 -0500
Fix bug 575: protect the list of logs with a mutex.  I couldn't find any appreciable change in logging performance on osx, but ymmv. You can undef USE_LOG_MUTEX to see if stuff gets faster for you.


svn:r13019
2008-01-02 05:38:53 +00:00
Nick Mathewson
a7ef07b4bd r15693@tombo: nickm | 2007-12-25 19:11:29 -0500
Here, have some terribly clever new buffer code.  It uses a mbuf-like strategy rather than a ring buffer strategy, so it should require far far less extra memory to hold any given amount of data.  Also, it avoids access patterns like x=malloc(1024);x=realloc(x,1048576);x=realloc(x,1024);append_to_freelist(x) that might have been contributing to memory fragmentation.  I've  tested it out a little on peacetime, and it seems to work so far.  If you want to benchmark it for speed, make sure to remove the #define PARANOIA; #define NOINLINE macros at the head of the module.


svn:r12983
2007-12-26 00:12:08 +00:00
Roger Dingledine
5925bc972c tweaks
svn:r12959
2007-12-24 23:51:22 +00:00
Roger Dingledine
9ebf86bb66 new config option FetchDirInfoEarly for tup/ioerror and the tordnsel
svn:r12896
2007-12-21 06:08:00 +00:00
Roger Dingledine
acd8bc1fd9 make r12871 do what i meant
svn:r12886
2007-12-20 06:36:44 +00:00
Roger Dingledine
f405f9b614 Make getinfo ns/purpose/bridge actually work
Also, dump our bridge router status entries to disk every 30 minutes.


svn:r12871
2007-12-19 04:58:58 +00:00
Nick Mathewson
d07122ba47 r17246@catbus: nickm | 2007-12-18 18:45:17 -0500
Fix some xxx020 items.


svn:r12864
2007-12-18 23:45:24 +00:00
Roger Dingledine
b63a247c68 Make bridge authorities test reachability of bridges.
Added two XXX020's that we need to think harder about.


svn:r12859
2007-12-18 21:37:58 +00:00
Nick Mathewson
820159cac5 r15530@tombo: nickm | 2007-12-17 16:54:03 -0500
First wodge of geoip code so bridges can figure out which countries are blocking them.


svn:r12845
2007-12-17 22:44:11 +00:00
Roger Dingledine
1d8a8063b9 clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
svn:r12786
2007-12-12 21:09:01 +00:00
Roger Dingledine
d46b8a3eac Stop being so aggressive about fetching dir info if your DirPort is
on but your ORPort is off.

Add a new config option BridgeRelay that specifies you want to
be a bridge relay. Right now the only difference is that it makes
you answer begin_dir requests, and it makes you cache dir info,
even if your DirPort isn't on.

Refactor directory_caches_dir_info() into some more functions.


svn:r12668
2007-12-04 18:35:03 +00:00
Roger Dingledine
9b1b8199df backport candidate:
Start purging old entries from the "rephist" database, and the
hidden service descriptor databases, even when DirPort is zero.


svn:r12628
2007-12-01 22:38:58 +00:00
Roger Dingledine
c26c54836f download the (admittedly tiny) v1 dir blobs even less often.
we can't make them totally obsolete yet but we can get closer.


svn:r12626
2007-12-01 20:02:05 +00:00
Roger Dingledine
f8df8d791e start to refactor dirserver_mode()
svn:r12621
2007-12-01 04:58:53 +00:00
Roger Dingledine
91bb09cb28 Only update guard status (usable / not usable) once we have
enough directory information. This was causing us to always pick
two new guards on startup (bugfix on 0.2.0.9-alpha), and it was
causing us to discard all our guards on startup if we hadn't been
running for a few weeks (bugfix on 0.1.2.x). Fixes bug 448.


svn:r12570
2007-11-26 02:18:57 +00:00
Nick Mathewson
1bdbd3b98e r16582@catbus: nickm | 2007-11-08 13:14:16 -0500
Try to bulletproof the parse logic for router-stability.


svn:r12441
2007-11-08 18:15:49 +00:00
Nick Mathewson
c3a745951b r16570@catbus: nickm | 2007-11-08 11:04:20 -0500
Keep track, for each OR connection, of the last time we added a non-padding cell to its outbuf.  Use this timestamp, not "lastwritten" to tell if it is time to close a circuitless connection.  (We can'tuse lastwritten, since lastwritten is updated when ever the connection flushes anything, and by that point we can no longer tell what is a padding cell and what is not.)


svn:r12437
2007-11-08 16:19:07 +00:00
Nick Mathewson
6aeca5237d r14631@tombo: nickm | 2007-11-02 00:18:17 -0400
Better log messages for "not enough to build a circuit" message.


svn:r12324
2007-11-02 04:18:28 +00:00
Nick Mathewson
832ef9562f r14623@tombo: nickm | 2007-11-01 22:25:18 -0400
More tweaks from karsten, with some cleanup and commentary.


svn:r12319
2007-11-02 02:25:28 +00:00
Nick Mathewson
2645219b4c r16322@catbus: nickm | 2007-11-01 00:26:15 -0400
Implement --quiet.


svn:r12306
2007-11-01 04:38:43 +00:00
Nick Mathewson
2c1d7cf674 r16194@catbus: nickm | 2007-10-26 18:37:02 -0400
Keep circuitless TLS connections open for 1.5 x MaxCircuitDirtiness: this ensures that we don't thrash closing and repoening connections to our guards.


svn:r12218
2007-10-26 22:50:40 +00:00
Roger Dingledine
f43b9638e4 Don't complain that "your server has not managed to confirm that its
ports are reachable" if we haven't been able to build any circuits
yet. Bug found by spending four hours without a v3 consensus.


svn:r12133
2007-10-23 15:44:13 +00:00
Nick Mathewson
5bfb422157 r15934@catbus: nickm | 2007-10-18 15:32:56 -0400
When we have plenty of directory information, don't try to launch descriptor downloads quite so eagerly.


svn:r12033
2007-10-18 19:51:14 +00:00
Nick Mathewson
192e3d71d4 r15915@catbus: nickm | 2007-10-18 10:26:44 -0400
Stop incessant notices about when we think the expected valid-after time should be, if we are not an authority.


svn:r12022
2007-10-18 14:27:42 +00:00
Nick Mathewson
54ac72f6b0 r15887@catbus: nickm | 2007-10-17 17:25:32 -0400
When a networkstatus consensus download fails, do not wait 60 seconds to decide whether to retry. (Also, log the time at which we'll try to replace the current networkstatus.)


svn:r12005
2007-10-17 21:26:22 +00:00
Nick Mathewson
9d7eba6ecc r15868@catbus: nickm | 2007-10-16 14:18:29 -0400
Remove nearly all calls to routerlist_remove_old().  Backport candidate.


svn:r11994
2007-10-16 18:19:02 +00:00
Nick Mathewson
3ad6dc0e2e r15806@catbus: nickm | 2007-10-15 19:14:57 -0400
Implement v3 networkstatus client code.  Remove v2 networkstatus client code, except as needed for caches to fetch and serve v2 networkstatues and the routers they list.


svn:r11957
2007-10-15 23:15:24 +00:00
Roger Dingledine
39902e93f7 Stop publishing a new server descriptor just because we HUP or
when we find our DirPort to be reachable but won't actually publish
it. Extra descriptors without any real changes are dropped by the
authorities, and can screw up our "publish every 18 hours" schedule.


svn:r11915
2007-10-13 22:31:35 +00:00
Nick Mathewson
9a56b17c54 r15679@catbus: nickm | 2007-10-11 09:51:33 -0400
Remove code to generate v1 directories.


svn:r11866
2007-10-11 13:56:33 +00:00
Nick Mathewson
8b71a76dd3 r15598@catbus: nickm | 2007-10-09 16:37:35 -0400
Turn all "Is DirPort nonzero? Because if it is, we must be a directory" logic into calls to dirserver_mode().


svn:r11817
2007-10-09 20:44:47 +00:00
Nick Mathewson
18ec603861 r14802@Kushana: nickm | 2007-10-08 17:21:30 -0400
Refactor out about a third of routerlist.c into a new networkstatus.c.  I\m not sure that I got everything that needed to move, but so far so good.


svn:r11791
2007-10-08 21:21:50 +00:00
Nick Mathewson
6f7847b378 r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke.


svn:r11761
2007-10-04 16:21:58 +00:00
Nick Mathewson
973502d290 r15046@catbus: nickm | 2007-09-11 13:38:36 -0400
Check V3 authority certificates for expiry, and warn the authority op as they get old.


svn:r11427
2007-09-11 20:17:22 +00:00
Nick Mathewson
1c8bd05c70 Fix compilation of ntmain.c.
svn:r11395
2007-09-06 18:19:09 +00:00
Nick Mathewson
f17a38ab04 r14940@catbus: nickm | 2007-09-06 13:22:26 -0400
Move NT services code into its own C file.  Probably will not build happily on win32 yet; more hacking needed.


svn:r11388
2007-09-06 17:42:05 +00:00
Nick Mathewson
3effc8b267 r14733@catbus: nickm | 2007-08-20 12:32:44 -0400
Clean up MTBF storage code. Do not count times that we have been down toward the current run.  Handle backward timewarps correctly.  Store MTBF data on exit in addition to periodically.


svn:r11225
2007-08-20 16:34:17 +00:00
Nick Mathewson
9958dc8d53 r14729@catbus: nickm | 2007-08-20 11:58:02 -0400
Trigger load and save of MTBF data.


svn:r11219
2007-08-20 15:59:31 +00:00
Roger Dingledine
3f186e6510 help nick work on proposal 108
svn:r11148
2007-08-17 01:29:58 +00:00
Nick Mathewson
357b4645cf r14612@catbus: nickm | 2007-08-16 15:23:35 -0400
Initial work on proposal 108: have rephist.c track the information we want to be tracking for OR stability.


svn:r11147
2007-08-16 19:32:29 +00:00
Nick Mathewson
ce1f01c3e6 r14531@catbus: nickm | 2007-08-13 14:46:25 -0400
Cache v3 networkstatus consensuses on disk.


svn:r11086
2007-08-13 18:47:22 +00:00
Nick Mathewson
45c82b1d85 r14024@catbus: nickm | 2007-07-30 14:13:58 -0400
Glibc (and maybe others) define a mallinfo() that can be used to see how the platform malloc is acting inside.  When we have it, dump its output on dumpmemusage().


svn:r10996
2007-07-30 18:14:14 +00:00
Nick Mathewson
915c4c3ab8 r14001@catbus: nickm | 2007-07-29 21:31:53 -0400
Try to call time(NULL) a little less.


svn:r10980
2007-07-30 01:32:12 +00:00
Nick Mathewson
77508edd36 r13989@catbus: nickm | 2007-07-29 19:11:07 -0400
More directory voting code.  Now, if everything works, and I haven't forgotten anything, it is possible to set up some v3 authorities and start voting. Of course, I have probably forgotten something, and there are probably bugs in there somewhere too.


svn:r10976
2007-07-29 23:11:44 +00:00
Roger Dingledine
9895d840f5 When running with dmalloc, dump more stats on hup and exit.
svn:r10961
2007-07-29 01:18:00 +00:00