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).
Nick Mathewson [Wed, 24 Dec 2008 02:38:07 +0000 (02:38 +0000)]
Use the literal parse of an address in dns_resolve_impl if parsing the address as an ipv4 or ipv6 address _succeeded_. Not if it failed. Bug introduced in r17707 (post 0.2.1.8-alpha), and found by xiando.
Nick Mathewson [Mon, 22 Dec 2008 16:37:20 +0000 (16:37 +0000)]
Documentation and conformance for WRA_* returns.
shahn: "Add some documentation for the WRA_* family of functions, also make
sure that (hopefully) all functions that return was_router_added_t
don't return ints directly and that they don't refer to integers in
their documentation anymore."
Nick Mathewson [Mon, 22 Dec 2008 16:22:04 +0000 (16:22 +0000)]
Partially apply bug 891 parch from forest: check EXTEND cell address against real_addr, not addr. I have questions about the rest of the patch: see the flyspray entry.
Roger Dingledine [Mon, 22 Dec 2008 09:10:06 +0000 (09:10 +0000)]
some windows users are outraged that tor refuses to work even
when their clock and date are correct, if their timezone is
totally wrong. now we at least tell them.
Roger Dingledine [Mon, 22 Dec 2008 06:25:49 +0000 (06:25 +0000)]
the default should not be the notify the poster, unless something
more extreme happens. the default should be to be quiet unless
something more extreme happens.
at least, this doesn't generate complaints anymore. perhaps that
means it is working better? :)
Roger Dingledine [Mon, 22 Dec 2008 06:21:28 +0000 (06:21 +0000)]
fix a fun bug on r17656 that was making us send HTTP/1.0 404 as
the message body, no matter the message headers, when answering
a descriptor or extrainfo post request.
Nick Mathewson [Fri, 19 Dec 2008 18:52:00 +0000 (18:52 +0000)]
Move in-addr.arpa parsing and generation into address.c, and simplify the code that does it elsewhere. Incidentally, this lets exit servers answer requests for ip6.arpa addresses.
Nick Mathewson [Thu, 18 Dec 2008 17:19:04 +0000 (17:19 +0000)]
Replace calls to time(NULL) that occur on the order of once per read, one per write, or once per cell with calls to a function that looks at a cached value of time. This is tricksy to benchmark, since it will only help on systems where time() is a syscall and syscalls are relatively slow.
Nick Mathewson [Thu, 18 Dec 2008 16:11:03 +0000 (16:11 +0000)]
Remove fixed xxx020s; downgrade unfixed ones.
(The unfixed ones are being downgraded to regular XXXs mainly on the rationale that they don't seem to be exploding Tor, and they were apparently not showstoppers for 0.2.0.x-final.)
Nick Mathewson [Thu, 18 Dec 2008 04:45:47 +0000 (04:45 +0000)]
Avoid nop call to control_event_or_authdir_new_descriptor that makes coverity think we are dereferencing a null pointer. It is safe, I think, but entirely too clever for our own good.