Nick Mathewson [Wed, 2 Jan 2008 06:59:15 +0000 (06:59 +0000)]
r15787@tombo: nickm | 2008-01-02 01:59:07 -0500
Allow config values in quotes to contain special characters, with full C escape syntax. With tests. Addresses bug 557.
Nick Mathewson [Wed, 2 Jan 2008 06:59:12 +0000 (06:59 +0000)]
r15786@tombo: nickm | 2008-01-02 01:11:51 -0500
Push the strdups used for parsing configuration lines into parse_line_from_string(). This will make it easier to parse more complex value formats, which in turn will help fix bug 557
Nick Mathewson [Wed, 2 Jan 2008 05:38:53 +0000 (05:38 +0000)]
r15784@tombo: nickm | 2008-01-02 00:38:06 -0500
Fix bug 575: protect the list of logs with a mutex. I couldn't find any appreciable change in logging performance on osx, but ymmv. You can undef USE_LOG_MUTEX to see if stuff gets faster for you.
Nick Mathewson [Wed, 2 Jan 2008 04:43:44 +0000 (04:43 +0000)]
r15779@tombo: nickm | 2008-01-01 23:43:24 -0500
Use reference-counting to avoid allocating a zillion little addr_policy_t objects. (This is an old patch that had been sitting on my hard drive for a while.)
Nick Mathewson [Sun, 30 Dec 2007 00:13:07 +0000 (00:13 +0000)]
r15750@tombo: nickm | 2007-12-29 19:12:51 -0500
Make HTTP-processing code in buffers.c faster: do not pull up 50K of text into the first chunk if the headers end earlier than that.
Nick Mathewson [Sat, 29 Dec 2007 17:36:03 +0000 (17:36 +0000)]
r17433@catbus: nickm | 2007-12-29 12:35:57 -0500
Incomplete code to avoid doing needless pull-ups on HTTP. Also, use memstr instead of strstr to find the content-length header.
Nick Mathewson [Wed, 26 Dec 2007 18:55:56 +0000 (18:55 +0000)]
r15717@tombo: nickm | 2007-12-26 13:55:53 -0500
Oops. flush_buf_tls can request more than the requested number of bytes. When that happens, do not let the size_t sz wrap around.
Nick Mathewson [Wed, 26 Dec 2007 18:09:36 +0000 (18:09 +0000)]
r15715@tombo: nickm | 2007-12-26 13:09:27 -0500
Peacetime managed to run overnight in paranoia mode. Disabling paranoia, so that buffers.c can be a little speedy again.
Nick Mathewson [Wed, 26 Dec 2007 00:36:05 +0000 (00:36 +0000)]
r15710@tombo: nickm | 2007-12-25 19:36:03 -0500
Fix in flush_buf_tls: it is okay to flush an empty buffer, since we may have a partial TLS record pending.
Nick Mathewson [Wed, 26 Dec 2007 00:12:08 +0000 (00:12 +0000)]
r15693@tombo: nickm | 2007-12-25 19:11:29 -0500
Here, have some terribly clever new buffer code. It uses a mbuf-like strategy rather than a ring buffer strategy, so it should require far far less extra memory to hold any given amount of data. Also, it avoids access patterns like x=malloc(1024);x=realloc(x,1048576);x=realloc(x,1024);append_to_freelist(x) that might have been contributing to memory fragmentation. I've tested it out a little on peacetime, and it seems to work so far. If you want to benchmark it for speed, make sure to remove the #define PARANOIA; #define NOINLINE macros at the head of the module.
Nick Mathewson [Wed, 26 Dec 2007 00:12:01 +0000 (00:12 +0000)]
r15691@tombo: nickm | 2007-12-25 18:13:54 -0500
New, slightly esoteric function, tor_malloc_roundup(). While tor_malloc(x) allocates x bytes, tor_malloc_roundup(&x) allocates the same size of chunk it would use to store x bytes, and sets x to the usable size of that chunk.
Roger Dingledine [Mon, 24 Dec 2007 11:25:45 +0000 (11:25 +0000)]
Fix several remotely triggerable asserts based on DirPort requests
for a v2 or v3 networkstatus object before we were prepared. This
was particularly bad for 0.2.0.13 and later bridge relays, who
would never have a v2 networkstatus and would thus always crash
when used. Bugfixes on 0.2.0.x.
Estimate the v3 networkstatus size more accurately, rather than
estimating it at zero bytes and giving it artificially high priority
compared to other directory requests. Bugfix on 0.2.0.x.
Roger Dingledine [Mon, 24 Dec 2007 10:31:39 +0000 (10:31 +0000)]
bugfix on r10612:
When we load a bridge descriptor from the cache,
and it was previously unreachable, mark it as retriable so we won't
just ignore it. Also, try fetching a new copy immediately.
Nick Mathewson [Sun, 23 Dec 2007 19:15:22 +0000 (19:15 +0000)]
r15653@tombo: nickm | 2007-12-23 14:15:12 -0500
Refactor circuit_launch* functions to take a bitfield of flags rather than 4 separate nonconsecutive flags arguments. Also, note a possible but in circuit_find_to_cannibalize, which seems to be ignoring its purpose argument.
Nick Mathewson [Sun, 23 Dec 2007 18:20:22 +0000 (18:20 +0000)]
r15646@tombo: nickm | 2007-12-23 13:17:33 -0500
Handle cross-compilation more sanely: avoid most uses of the (never-defined!) CROSS_COMPILE variable; in the one place where we cannot help it, use the correct cross_compiling.
Roger Dingledine [Sun, 23 Dec 2007 01:18:14 +0000 (01:18 +0000)]
If we receive a general-purpose descriptor and then receive an
identical bridge-purpose descriptor soon after, don't discard
the next one as a duplicate.
Roger Dingledine [Sat, 22 Dec 2007 11:48:17 +0000 (11:48 +0000)]
If bridge authorities set BridgePassword, they will serve a
snapshot of known bridge routerstatuses from their DirPort to
anybody who knows that password. Unset by default.
Roger Dingledine [Fri, 21 Dec 2007 23:28:23 +0000 (23:28 +0000)]
Fix a crash when accessing hidden services: it would work the first
time you use a given introduction point for your service, but
on subsequent requests we'd be using garbage memory. Fixed by
Karsten Loesing. Bugfix on 0.2.0.12-alpha.
Roger Dingledine [Fri, 21 Dec 2007 22:58:22 +0000 (22:58 +0000)]
Fix a crash when we fetch a descriptor that turns out to be
unexpected (it used to be in our networkstatus when we started
fetching it, but it isn't in our current networkstatus), and we
aren't using bridges. Bugfix on 0.2.0.x.
Roger Dingledine [Thu, 20 Dec 2007 06:47:59 +0000 (06:47 +0000)]
Only Tors that want to mirror the v2 directory info should
create the "cached-status" directory in their datadir. All Tors
used to create it. Bugfix on 0.1.2.x.
Bridge relays with DirPort set to 0 no longer cache v1 or v2
directory information; there's no point. Bugfix on trunk.
Nick Mathewson [Thu, 20 Dec 2007 06:15:09 +0000 (06:15 +0000)]
r17274@catbus: nickm | 2007-12-20 01:14:09 -0500
Don't try to create the datadir when we are only verifying the configuration or hashing a password. Resolves bug 540.
Nick Mathewson [Thu, 20 Dec 2007 05:06:02 +0000 (05:06 +0000)]
r17270@catbus: nickm | 2007-12-20 00:04:21 -0500
When we decide to send a 503 in response to a request for server descriptors, disable spooling so that we do not then send the descriptors anyway. Fixes bug 539.
Roger Dingledine [Wed, 19 Dec 2007 03:11:02 +0000 (03:11 +0000)]
When we were reading router descriptors from cache, we were ignoring
the annotations -- including reading in bridge-purpose descriptors
as general-purpose descriptors.
Nick Mathewson [Mon, 17 Dec 2007 22:44:16 +0000 (22:44 +0000)]
r15531@tombo: nickm | 2007-12-17 17:19:24 -0500
Support raw IP-to-country as well as postprocessed format. Include GEOIP summary in extrainfo of bridges.