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.
Nick Mathewson [Wed, 17 Dec 2008 22:58:14 +0000 (22:58 +0000)]
Rename ServerDNSAllowBrokenResolvConf to ServerDNSAllowBrokenConfig.
(Many users have no idea what a resolv.conf is, and shouldn't be forced to learn. The old option will keep working for now.)
Also, document it.
Roger Dingledine [Wed, 17 Dec 2008 22:32:17 +0000 (22:32 +0000)]
Clip the MaxCircuitDirtiness config option to a minimum of 10
seconds. Warn the user if lower values are given in the
configuration. Bugfix on 0.1.0.1-rc. Patch by Sebastian.
Clip the CircuitBuildTimeout to a minimum of 30 seconds. Warn the
user if lower values are given in the configuration. Bugfix on
0.1.1.17-rc. Patch by Sebastian.
Nick Mathewson [Mon, 15 Dec 2008 21:17:53 +0000 (21:17 +0000)]
Don't extend circuits over noncanonical connections with mismatched addresses.
Also, refactor the logic to check whether we will use a connection or
launch a new one into a new function.
Roger Dingledine [Sun, 14 Dec 2008 19:40:56 +0000 (19:40 +0000)]
When a stream at an exit relay is in state "resolving" or
"connecting" and it receives an "end" relay cell, the exit relay
would silently ignore the end cell and not close the stream. If
the client never closes the circuit, then the exit relay never
closes the TCP connection. Bug introduced in Tor 0.1.2.1-alpha;
reported by "wood".
Nick Mathewson [Fri, 12 Dec 2008 20:30:42 +0000 (20:30 +0000)]
Implement proposal 148: Make client stream end reasons uniform.
This patch makes every RELAY_COMMAND_END cell that we send pass through one of two functions: connection_edge_end and relay_send_end_cell_from_edge. Both of these functions check the circuit purpose, and change the reason to MISC if the circuit purpose means that it's for client use.
Nick Mathewson [Thu, 11 Dec 2008 21:11:28 +0000 (21:11 +0000)]
Note that a couple of line in control.c are supposed to be dead-code.
I'm hoping not to have to litter the rest of our codebase with Coverity ignores, but I think these are the only one we need right now.
Nick Mathewson [Thu, 11 Dec 2008 21:11:26 +0000 (21:11 +0000)]
If we are building under Coverity, enable geoip_stats and instrument_downloads.
This makes sure that a) optional code gets analyzed too, and b) it doesn't
look like dead code to Coverity.
Nick Mathewson [Thu, 11 Dec 2008 19:40:58 +0000 (19:40 +0000)]
Refactor find_first_by_keyword into one variant that can return NULL and one that can't.
This makes it easier for us to avoid errors where we we forgot to list a keyword as mandatory, and easier for Coverity to detect cases like this too.
Nick Mathewson [Thu, 11 Dec 2008 19:12:45 +0000 (19:12 +0000)]
Change directory_get_from_dirserver to take a set of flags to be passed to pick_(trusted_)dirserver. This lets us make its interface smarter, and makes code that calls it a little more readable.
Nick Mathewson [Wed, 10 Dec 2008 22:57:41 +0000 (22:57 +0000)]
Fix a logic error that would automatically reject all but the first configured DNS server. Bugfix on 0.2.1.5-alpha. Possible fix for part of 813/868. Spotted by coderman
Nick Mathewson [Wed, 10 Dec 2008 22:28:00 +0000 (22:28 +0000)]
Clarify current client behavior WRT TLS certificates. Add a TODO to make sure that this behavior is optional, and an entry in 098-todo.txt for investigating whether this behavior is smart.
Roger Dingledine [Wed, 10 Dec 2008 01:46:51 +0000 (01:46 +0000)]
When a directory authority gives us a new guess for our IP address,
log which authority we used. Hopefully this will help us debug
the recent complaints about bad IP address guesses.