Only caches need to get running-routers; nobody needs to parse, store,
or use it. Same for the router-status line in the directories. Add
many #if 0's that can get removed once I'm convinced they don't
contain anything I'm forgetting.
Start all newly-parsed routers as non-running and non-valid; update
them from the list of network statuses.
Update all routers when a new networkstatus comes in.
After 3 tries for a networkstatus, clients give up until they're told
to try again.
"Let's get those missles ready to **DESTROY THE UNIVERSE**!"
-TMBG
svn:r5063
connection.c:
- Add some more connection accessor functions to make directory
download redundancy checking work.
directory.c, or.h, router.c, routerlist.c:
- Start on logic to note when networkstatus downloads fail.
dirserv.c, routerlist.c, routerparse.c:
- Start maintaining an is_named field in routerstatus_t. Don't
actually look at it yet.
dirserv.c, routerlist.c:
- Remove expired networkstatus objects.
or.h:
- Make some booleans into bitfields
- Add prototypes
routerlist.c:
- Sort networkstatus list by publication time
- Function to remove old (older than 10 days) networkstatus objects.
- Function to set a list of routerinfo_ts' status info from the
current set of networkstatus objects.
- Function to tell which routerinfos we need to download based no the
current set of networkstatus objects.
- Do not launch a networkstatus download if a redundant one is in progress.
routerparse.c:
- Keep router entries in networkstatus sorted by digest.
svn:r5012
- Distinguish v1 authorities (all currently trusted directories) from
v2 authorities (all trusted directories).
- Add configuration option for which dirs are v1 authories.
- Add configuration option for whether to be a v1 authority.
- Make trusted dirserver selection functions take options to
choose which functionality we need.
- Remove option when getting directory cache to see whether they
support running-routers; they all do now. Replace it with one
to see whether caches support v2 stuff.
- Parse, cache, and serve network-status objects properly.
- Serve compressed groups of router descriptors. The compression logic
here could be more memory-efficient.
-
svn:r4911
Probably very buggy, since I can't actually run an authdir.
Features
- Generate and publish new network-status format
- Code to cache and re-serve network-status objects generated by others.
- Publish individual descriptors (by fingerprint, by "all", and by
"tell me yours.") [Still needs compression logic]
- Publish client and server recommended versions seprately.
- Add digest of descriptor to routerinfo_t, so we can track them better, and
length, so we can server them more easily.
Cleanups
- Unify code to sign directory-like things
- Make resolve_my_address() able to tell you which name it wound up resolving.
- Unify code to store and serve directory-like things so it all uses
cached_dir_t.
- Unify code to set the value of cached_dir_t objects.
svn:r4835
Tor server, and only list them as running if they've been found to
be reachable.
Dirservers also log trouble servers, but only start complaining loudly
after they've been up for an hour, to reduce false positives. We still
need to do something about the fact that it is quite loud when there
are many trouble servers.
svn:r4829
it if it's not.
(this also fixes some potential security problems with people providing
hostnames as their address and then preferentially resolving them and
partitioning users.)
svn:r4790
- Mapaddress
- Postdescriptor
- GetInfo on descriptors
Required changes elsewhere:
- Keep the most recent running_routers_t in the routerlist_t. That way we
can learn about new routers and remember whether we were last told that
they were up or down. Also enables more simplifications.
- Keep the signed descriptor inside routerinfo_t. This makes
descriptor_entry_t in dirservers.c unneeded.
- Rename AddressMap (the verb) to MapAddress. Keep AddressMap as a noun.
- Check addresses for plausibility before mapping them.
svn:r3696
clock, then don't bother checking recommended-versions: it will
just make us sad.
as a side effect, people running obsolete versions and whose
clocks are wildly skewed will not be auto-shut-down. but they
will still get warns about their clock skew.
svn:r3459
directories on disk. Make authdirservers cache *their own*
directories instead of the ones they download. This gives better
liveness, and marginally better resistance to broken authdirservers.
Authdirservers don't cache running-routers at all: r-r isn't stored to
disk, so there's no point right now.
svn:r2893
they weren't writing anything into their datadirectory, so
when they stop and start, they would know nothing until they
fetched a directory from another authdirserver.
svn:r2891
Now we can try setting an option but back out if it fails to parse, or
if it's disallowed (e.g. changing RunAsDaemon from 1 to 0).
Use parse_line_from_str rather than parse_line_from_file.
svn:r2692
maintain it.
Have clients default to the nickname "client" in their certificates.
Give a less frightening warning on obsolete (pre-0.0.8) routerinfo_t's.
svn:r2568
files have really old descriptors for the authdirservers, so we're
asking them in the new format because they're too old.
now we actually compare the version to a cutoff version, and act
appropriately.
also take this chance to use only >=0.0.8 servers for dns resolves,
because of the recent bugs. we'll bump to >=0.0.9pre1 once there are
some servers running that.
svn:r2380
o and/or while avoiding unreliable nodes, depending on goals
o 'fascistfirewall' option to pick dirservers on port 80 and ORs on
port 443.
o if a begin failed due to exit policy, but we believe the IP should have been allowed, switch that router to exitpolicy reject *:* until we get our next directory.
svn:r2231
you know you might want to get it verified
also, moved that whole block below the check-signature logic, so
we don't execute it if the directory is a fake.
(the recommended-versions logic is still executed before the signature
is checked; we should fix that.)
svn:r2131
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
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