Roger Dingledine
2b7b86f5e6
stop trying to print a NULL
...
plus make router_nickname_is_approved() more obviously unused
svn:r2469
2004-10-13 20:17:45 +00:00
Nick Mathewson
afd8b650ee
hex-to-hex compare makes more sense than hex-to-bin.
...
svn:r2463
2004-10-13 19:17:27 +00:00
Roger Dingledine
a1041154eb
fix const char * vs char * issue
...
plus unshadow some variables
svn:r2460
2004-10-13 04:44:37 +00:00
Nick Mathewson
9c49947163
Check fingerprint list before generating running-routers lists; also add as-yet-uncalled function to update an OR connection nickname on the fly
...
svn:r2458
2004-10-13 01:13:37 +00:00
Nick Mathewson
43ef5a3e37
Add long-term format for dir-signing-key fields (commented out)
...
svn:r2442
2004-10-12 15:52:57 +00:00
Nick Mathewson
c7e8c2098a
Include a dir-signing-key token in directories to tell the parsing entity which key is being used to sign. This is the first step in obsoleting the dirservers file.
...
svn:r2428
2004-10-07 21:10:40 +00:00
Nick Mathewson
ce3162d035
Make base-64-encoded DER work, including workaround for ugly openssl misfeature that makes base64 decoding fail when you strip out the newlines.
...
svn:r2423
2004-10-07 03:11:42 +00:00
Nick Mathewson
2bba65148b
Refactor fingerprint handling: remember hex digests (no spaces) instead of beautified fingerprints
...
svn:r2422
2004-10-06 13:31:48 +00:00
Nick Mathewson
9e8ae9766e
Only check versions against downloaded directories, not cached directories.
...
svn:r2413
2004-10-03 02:37:52 +00:00
Roger Dingledine
3f4b544b77
use size_t rather than int for directory lengths in memory
...
this might fix a bug with amd64
svn:r2410
2004-10-01 21:02:12 +00:00
Roger Dingledine
136d4e5739
prefer tor_free to free
...
plus complain more loudly when we fail to parse a dir we just fetched
svn:r2401
2004-09-29 06:52:36 +00:00
Roger Dingledine
a31ba30ae6
if our local cached directory is new enough, go ahead and
...
start building circuits while we're fetching a new one
svn:r2394
2004-09-28 23:27:41 +00:00
Roger Dingledine
4b3001a08c
fix some local buffer overflows
...
fix a memory leak
svn:r2391
2004-09-28 22:38:21 +00:00
Nick Mathewson
d20d10f360
If we are an authoritative dirserver, check out the fingerprint list when setting connection nicknames
...
svn:r2389
2004-09-28 22:24:56 +00:00
Roger Dingledine
9f9f0e5edd
fix another bug with cached compressed directories
...
still not working
svn:r2383
2004-09-27 07:28:48 +00:00
Roger Dingledine
d0edf8e8b5
fix two bugs with cached directories:
...
- don't complain that you won't cache it, then cache it anyway.
- change confusing terminology from 'deflate' to 'compress', so
we'll stop getting our logic backwards. i assume the rfc author
has shot himself by now.
svn:r2382
2004-09-27 06:57:16 +00:00
Roger Dingledine
185b9fddf2
protect dirservers from overzealous descriptor uploading
...
wait 10 seconds after directory gets dirty, before regenerating
svn:r2370
2004-09-23 19:58:44 +00:00
Nick Mathewson
c20b24c952
clean up/bugfix deflate logic and log messages
...
svn:r2359
2004-09-21 18:09:38 +00:00
Nick Mathewson
0ef85f6dba
Some platforms have weird translations when you open files in "test" mode; make read/write_str_to_file aware.
...
svn:r2336
2004-09-08 07:16:34 +00:00
Nick Mathewson
c66e4c4870
Flush more changes from sandbox
...
- make clients cache directories and use them to seed their router lists
at startup. This means clients have a datadir again.
- Introduce a global_write_bucket. We need to respond better to exhausting
it.
- Remove the last vestiges of LinkPadding and TrafficShaping.
- Configuration infrastructure support for warning on obsolete options.
- Refactor directory header parsing to use smartlist_split_string.
- Respond to content-encoding headers by trying to uncompress as appropriate.
- Reply with a deflated directory when a client asks for "dir.z".
(We could use allow-encodings instead, but allow-encodings isn't
specified in HTTP 1.0.)
svn:r2335
2004-09-08 06:52:33 +00:00
Nick Mathewson
d6e47bec46
Keep a deflated version of each directory so we can deliver it when requested
...
svn:r2328
2004-09-02 18:57:09 +00:00
Roger Dingledine
7506cce649
stop wasting cpu time on authdirservers
...
we were making a new directory only when the old one was dirty, but
every time we made one, we'd dirty it by testing it right then.
svn:r2199
2004-08-08 11:15:38 +00:00
Nick Mathewson
f6cc218742
Refactor ISO-style (yyyy-mm-dd hh:mm:ss) time parsing into util.c; rename format/parse_rfc1123_time; make rephist remember used bandwidth; published used bandwidth in descriptors in 15-minute chunks. Breaks unittests.
...
svn:r2182
2004-08-07 02:46:16 +00:00
Roger Dingledine
e95ae1c9ad
let purging routerinfos and descriptors take an age argument
...
svn:r2171
2004-08-06 22:15:25 +00:00
Nick Mathewson
3ca2728eb2
(size_t)-1 is never < 0; fix an XXXX008 by changing the interface for dirserv_get_runningrouters
...
svn:r2165
2004-08-06 20:00:16 +00:00
Roger Dingledine
1d41c0ee35
note a bug that adam found
...
svn:r2150
2004-08-06 02:27:06 +00:00
Nick Mathewson
5b61dd0457
Fix all warnings on win32 build
...
svn:r2127
2004-08-03 23:57:05 +00:00
Roger Dingledine
a328aab316
clean whitespace and tabs
...
svn:r2115
2004-07-22 23:21:12 +00:00
Roger Dingledine
aebec8ab9e
stop using atexit() to remove our pid, since it's called
...
immediately when we daemonize.
also drop our retry period for hidserv desc uploads from 10m to 5m
svn:r2111
2004-07-22 22:15:36 +00:00
Nick Mathewson
7b4865ec33
Add notion of "longest nickname-or-hex-digest-with-$"
...
svn:r2108
2004-07-22 21:31:04 +00:00
Roger Dingledine
a403c1035e
getting an unknown descriptor is an info, not a warn, now
...
svn:r2098
2004-07-22 06:04:13 +00:00
Roger Dingledine
6c56f34aaf
clients shouldn't create datadir until we have something to put there
...
svn:r2092
2004-07-22 00:13:42 +00:00
Roger Dingledine
f82a36508d
make router_nickname_is_approved() do the right thing
...
svn:r2090
2004-07-21 22:54:27 +00:00
Roger Dingledine
3783d2e682
if johnny has three fenceposts, and jill takes four away...
...
svn:r2089
2004-07-21 22:37:03 +00:00
Roger Dingledine
ecc9009256
authdirservers accept the uploading of unverified descriptors.
...
fix a bunch of bugs in router_update_status_from_smartlist()
(Nick, did I get them all, or was there a trickier one still hiding?)
svn:r2081
2004-07-21 09:13:12 +00:00
Roger Dingledine
dc7951a5a7
a whole swath of fixes
...
introduce an authdir_mode() macro to match the others.
don't initialize uptime to the number of seconds since 1970.
non-authoritative dirservers don't cache their directory on disk.
make only authdirservers use clique_mode.
only read approved-routers file if you're an authdirserver.
even authdirservers fetch a new directory in do_hup.
retry_all_connections() is now called retry_all_listeners().
router_parse_list_from_string() correctly reports the router number
it's working on.
only call dirserv_add_own_fingerprint() and
dirserv_add_descriptor() on startup if we're an authdirserver.
if AuthDir and !ORPort then fail.
if AuthDir and ClientOnly then fail.
svn:r2061
2004-07-20 10:17:43 +00:00
Nick Mathewson
1040762531
Remove 1024-router limit in routerparse.c; unify handling of running-routers lines in running-routers requests and in directories; set is_verified field of routerinfo_ts correctly; use most-recent-info rule to decide whether to change router-is-running status.
...
svn:r2051
2004-07-16 23:05:40 +00:00
Nick Mathewson
c2103eb63a
Finish most pre2 items: make running-routers list work right; rename secret key files; make even more lookup-by-nickname use lookup-by-id; default nicknames to hostname.
...
svn:r2043
2004-07-13 18:23:40 +00:00
Roger Dingledine
e1ba0c4663
running-routers now lists down routers too (with a ! before their name)
...
svn:r1996
2004-07-01 11:32:26 +00:00
Roger Dingledine
f42f04c859
cleanups on 008pre1 items
...
svn:r1993
2004-06-30 21:48:02 +00:00
Nick Mathewson
b1e9adf056
Always use get_data_directory() instead of options.DataDirectory; fix a memory leak in router.c
...
svn:r1991
2004-06-30 16:37:08 +00:00
Nick Mathewson
76f769deb9
Remaining 008pre1 items done; deferred where more design is needed.
...
More docs and (way more!) testing needed.
Done:
- Authdirservers down directories from others.
- Generate and use running-routers lists
- Cache directories; store across reboots.
- Refactor directory parsing a bit; note potential trouble spots.
svn:r1985
2004-06-25 00:29:31 +00:00
Nick Mathewson
8aec3a7301
Implement several 008pre1 items: needs more testing
...
svn:r1981
2004-06-21 04:37:27 +00:00
Roger Dingledine
ba5d48e852
router->is_trusted_dir implies router->dir_port>0
...
and add some infrastructure for fetching running-routers list
svn:r1973
2004-06-16 21:08:29 +00:00
Roger Dingledine
30a07b2ecd
non-dirservers expire routerinfo's that are more than a day old
...
svn:r1907
2004-05-20 05:10:30 +00:00
Roger Dingledine
41c9b8230d
fix compile error in dirserv
...
(declare variables before the rest of the function)
svn:r1896
2004-05-19 19:42:50 +00:00
Nick Mathewson
1cfac90984
remove upper limit on number of descriptors/directories in dirserver; use smartlists instead of arrays
...
svn:r1894
2004-05-18 17:41:40 +00:00
Roger Dingledine
d2de7120fa
fix a seg fault, add another XXX for nick ;)
...
svn:r1892
2004-05-18 16:54:04 +00:00
Nick Mathewson
7511fbf993
Resolve some XXXs
...
svn:r1889
2004-05-18 15:35:21 +00:00
Nick Mathewson
50b7ebcf9e
Make directory functions update routerlist, not replace it. Add notion of OR-is-trusted-to-be-a-dirserver. Arma, please review: does this handle being a dirserver right?
...
svn:r1880
2004-05-17 20:31:01 +00:00