Nick Mathewson [Sat, 10 Jan 2009 14:40:43 +0000 (14:40 +0000)]
Fix a harmless-to-us bug in ht.h.
There was a field that _HT_FOI_INSERT was never setting. Everything that calls _HT_FOI_INSERT was setting it via tor_malloc_zero, but that's fragile.
Nick Mathewson [Wed, 7 Jan 2009 21:05:02 +0000 (21:05 +0000)]
Check that Libevent header version matches Libevent library version.
Unfortunately, old Libevents don't _put_ a version in their headers, so
this can get a little tricky. Fortunately, the only binary-compatibility
issue we care about is the size of struct event. Even more fortunately,
Libevent 2.0 will let us keep binary compatiblity forever by letting us
decouple ourselves from the structs, if we like.
Discard router descriptors as we load them if they are more than
five days old. Otherwise if Tor is off for a long time and then
starts with cached descriptors, it will try to use the onion
keys in those obsolete descriptors when building circuits. Bugfix
on 0.2.0.x. Fixes bug 887.
When our circuit fails at the first hop (e.g. we get a destroy
cell back), avoid using that OR connection anymore, and also
tell all the one-hop directory requests waiting for it that they
should fail. Bugfix on 0.2.1.3-alpha.
When a relay gets a create cell it can't decrypt (e.g. because it's
using the wrong onion key), we were dropping it and letting the
client time out. Now actually answer with a destroy cell. Bugfix
on 0.0.2pre8.
Jan 06 13:03:57.309 [info] networkstatus_set_current_consensus(): Loaded an obsolete consensus. Discarding.
Jan 06 13:03:57.309 [warn] Couldn't load consensus networkstatus from "bridge/cached-consensus"
Prevent bridge relays from serving their 'extrainfo' document
to anybody who asks, now that extrainfo docs include potentially
sensitive aggregated client geoip summaries.
Bugfix on r13098. Backport candidate.
When we made bridge authorities stop serving bridge descriptors over
unencrypted links, we also broke DirPort reachability testing for
bridges. So bridges with a non-zero DirPort were printing spurious
warns to their logs. Bugfix on 0.2.0.16-alpha. Fixes bug 709.
the new alpha release is coming out this week sometime. too many
bugs fixed to keep waiting. i still need to track down bug 709
first though, since i am increasingly thinking it's a real bug.
Bridge relays that had DirPort set to 0 would stop fetching
descriptors shortly after startup, and then briefly resume
after a new bandwidth test and/or after publishing a new bridge
descriptor. Bridge users that try to bootstrap from them would
get a recent networkstatus but would get descriptors from up to
18 hours earlier, meaning most of the descriptors were obsolete
already. Reported by Tas; bugfix on 0.2.0.13-alpha.
If the cached networkstatus consensus is more than five days old,
discard it rather than trying to use it. In theory it could
be useful because it lists alternate directory mirrors, but in
practice it just means we spend many minutes trying directory
mirrors that are long gone from the network. Helps bug 887 a bit;
bugfix on 0.2.0.x.
Sebastian Hahn [Mon, 5 Jan 2009 13:50:02 +0000 (13:50 +0000)]
Better explain the PublishServerDescriptor option in the manpage
PublishServerDescriptor 1 means "publish to the relevant authority", not "publish to v2,v3 authorities". Also adjust the time in the manpage to January 2009
Nick Mathewson [Sun, 4 Jan 2009 23:15:42 +0000 (23:15 +0000)]
Another fun openbsd warning fix. On ioerror's computer at least, they redefined an unsigned field in zlib.h to be signed. I am quite sure this makes me more secure somehow.
Nick Mathewson [Sun, 4 Jan 2009 22:47:42 +0000 (22:47 +0000)]
OpenBSD malloc.h believes that you should be able to detect headers with autoconf, or build without warnings, but not both. So never include malloc.h on OpenBSD. Backport candidate.
Nick Mathewson [Sun, 4 Jan 2009 00:35:51 +0000 (00:35 +0000)]
Remove svn $Id$s from our source, and remove tor --version --version.
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed. They were not actually useful for
telling the version of Tor files in the wild.
Nick Mathewson [Fri, 2 Jan 2009 20:39:38 +0000 (20:39 +0000)]
Try harder to make sure we zero-out the extraneous sockaddr fields and that we set sockaddr_len. Conceivably a backport candidate, though nothing has yet been sen to break.
Nick Mathewson [Mon, 29 Dec 2008 19:55:23 +0000 (19:55 +0000)]
Document RELAY_EARLY cells in tor-spec.txt: proposal 110 is mostly implemented, and the rest of it will need to wait until all current Tor 0.2.0.x clients are obsolete to close.
Nick Mathewson [Mon, 29 Dec 2008 16:54:56 +0000 (16:54 +0000)]
Extact parse-the-token-arguments to its own function, and change it to a single-pass algorithm. This simplifies the parsing code and speeds it up a little.
Nick Mathewson [Mon, 29 Dec 2008 14:06:47 +0000 (14:06 +0000)]
coverity thinks it's dumb to check networkstatus_v2_list in one place and not another. Coverity has a point, even though the check may be redundant. CID 361.
Nick Mathewson [Mon, 29 Dec 2008 01:47:33 +0000 (01:47 +0000)]
Switch address comparisons in policies to be exact rather than semantic. Until we do ipv6 exit policies and until we know whether we even allow ::ffff:0:0/96 addresses, there is no point in doing "semantic" comparisons. This was also showing up on oprofile.
Nick Mathewson [Mon, 29 Dec 2008 01:47:28 +0000 (01:47 +0000)]
Refactor some exit-policy-related functions that showed up in oprofile.
Specifically, split compare_tor_addr_to_addr_policy() from a loop with a bunch
of complicated ifs inside into some ifs, each with a simple loop. Rearrange
router_find_exact_exit_enclave() to run a little faster. Bizarrely,
router_policy_rejects_all() shows up on oprofile, so precalculate it per
routerinfo.
Nick Mathewson [Mon, 29 Dec 2008 01:30:35 +0000 (01:30 +0000)]
Fix bug in recent address.c patch: actually set the value of address * to 0.0.0.0 as we did before. This makes CMP_EXACT comparisons with bitmask 0 work on address * again.
Roger Dingledine [Sat, 27 Dec 2008 06:50:07 +0000 (06:50 +0000)]
New controller event "clients_seen" to report a geoip-based summary
of which countries we've seen clients from recently. Now controllers
like Vidalia can show bridge operators that they're actually making
a difference.
Nick Mathewson [Fri, 26 Dec 2008 21:26:03 +0000 (21:26 +0000)]
get_interface_addr6(), and by extension get_interface_addr(), were pretty borked. Copying a tor_addr_t from a sockaddr_storage using memcpy is a poor notion.
Nick Mathewson [Fri, 26 Dec 2008 20:37:18 +0000 (20:37 +0000)]
Refactor tor_addr_compare_masked() so that CMP_SEMANTIC makes more sense, and has decent semantics for maskbits; and so that CMP_EXACT works right for bits==0.
Nick Mathewson [Fri, 26 Dec 2008 17:35:12 +0000 (17:35 +0000)]
Document the pk operation count fields in rephist.c, and move them into a struct for clarity, and change their type to what we actually want to cast them to.
Nick Mathewson [Fri, 26 Dec 2008 17:35:08 +0000 (17:35 +0000)]
Add more missing documentation, and correct an error in container.c documentation: Don't introduce two parameters called n when you're calling an algorithm O(n).