]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
14 years agoCall evthread_use_windows_threads when running with IOCP on windows
Nick Mathewson [Wed, 17 Aug 2011 18:44:16 +0000 (14:44 -0400)] 
Call evthread_use_windows_threads when running with IOCP on windows

14 years agoUse evbuffer_copyout() in inspect_evbuffer().
Nick Mathewson [Wed, 17 Aug 2011 17:07:43 +0000 (13:07 -0400)] 
Use evbuffer_copyout() in inspect_evbuffer().

14 years agoBufferevents now requires Libevent 2.0.13-stable.
Nick Mathewson [Wed, 17 Aug 2011 16:53:50 +0000 (12:53 -0400)] 
Bufferevents now requires Libevent 2.0.13-stable.

(Earlier Libevent versions have bufferevent bugs that affect us, and
are missing some APIs that it would be handy to use.)

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Wed, 17 Aug 2011 16:00:44 +0000 (12:00 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

Conflicts:
src/or/config.c

14 years agoDon't write ControlPorts to disk till after we setuid and make datadir
Nick Mathewson [Wed, 17 Aug 2011 15:22:16 +0000 (11:22 -0400)] 
Don't write ControlPorts to disk till after we setuid and make datadir

Fix for bug 3747; bugfix on 0.2.2.26-beta.

14 years agoMerge branch 'bug3743'
Nick Mathewson [Wed, 17 Aug 2011 14:46:28 +0000 (10:46 -0400)] 
Merge branch 'bug3743'

14 years agoRemove a needless config_find_option
Nick Mathewson [Wed, 17 Aug 2011 14:46:22 +0000 (10:46 -0400)] 
Remove a needless config_find_option

14 years agoActually pick a random port when "auto" is specified
Sebastian Hahn [Mon, 15 Aug 2011 23:38:15 +0000 (01:38 +0200)] 
Actually pick a random port when "auto" is specified

ddc65e2b3303559ab7b842a176ee6c2eda9e4027 had broken this

14 years agoDon't compare LINELIST_S and OBSOLETE config options.
Kamran Riaz Khan [Tue, 16 Aug 2011 01:28:38 +0000 (06:28 +0500)] 
Don't compare LINELIST_S and OBSOLETE config options.

14 years agoMerge remote-tracking branch 'asn/bug3728'
Nick Mathewson [Mon, 15 Aug 2011 15:06:50 +0000 (11:06 -0400)] 
Merge remote-tracking branch 'asn/bug3728'

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Mon, 15 Aug 2011 14:54:55 +0000 (10:54 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoRemove extra quotation marks around the result of esc_for_log
Robert Ransom [Mon, 15 Aug 2011 11:53:11 +0000 (04:53 -0700)] 
Remove extra quotation marks around the result of esc_for_log

14 years agoOops; _actually_ enable microdesc-by-default for clients
Nick Mathewson [Mon, 15 Aug 2011 14:52:23 +0000 (10:52 -0400)] 
Oops; _actually_ enable microdesc-by-default for clients

It turns out that it wasn't enough to set the configuration to
"auto", since the correct behavior for "auto" had been disabled in
microdesc.c.   :p

(Hasn't been in a release yet, so doesn't need a changes entry.)

14 years agoFree global_rate_limit in connection_free_all().
George Kadianakis [Sat, 13 Aug 2011 18:37:13 +0000 (20:37 +0200)] 
Free global_rate_limit in connection_free_all().

14 years agoMove connection_free_all() to the bottom of connection.c to enjoy maximum visibility.
George Kadianakis [Sat, 13 Aug 2011 18:29:22 +0000 (20:29 +0200)] 
Move connection_free_all() to the bottom of connection.c to enjoy maximum visibility.

14 years agoMerge remote-tracking branch 'sebastian/bug3700'
Nick Mathewson [Thu, 11 Aug 2011 18:42:15 +0000 (14:42 -0400)] 
Merge remote-tracking branch 'sebastian/bug3700'

14 years agoDon't warn on http connection to my orport
Sebastian Hahn [Thu, 11 Aug 2011 18:37:51 +0000 (20:37 +0200)] 
Don't warn on http connection to my orport

Also remove a few other related warnings that could occur during the ssl
handshake. We do this because the relay operator can't do anything about
them, and they aren't their fault.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Thu, 11 Aug 2011 15:53:03 +0000 (11:53 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoMerge branch 'bug3643'
Sebastian Hahn [Thu, 11 Aug 2011 05:56:38 +0000 (07:56 +0200)] 
Merge branch 'bug3643'

14 years agoIgnore deprecation warnings on OS X
Sebastian Hahn [Wed, 10 Aug 2011 17:22:41 +0000 (19:22 +0200)] 
Ignore deprecation warnings on OS X

Starting with Lion, Apple decided to deprecate the system openssl. We
can start requiring users to install their own openssl once OS X doesn't
ship with it anymore.

14 years agoWhitespace tweaks
Nick Mathewson [Wed, 10 Aug 2011 19:06:45 +0000 (15:06 -0400)] 
Whitespace tweaks

14 years agoFix a const warning in bug1692 code
Nick Mathewson [Wed, 10 Aug 2011 19:06:11 +0000 (15:06 -0400)] 
Fix a const warning in bug1692 code

14 years agoMerge branch 'bug1692-squashed'
Nick Mathewson [Wed, 10 Aug 2011 19:04:36 +0000 (15:04 -0400)] 
Merge branch 'bug1692-squashed'

14 years agoFix condition reported by nickm.
Kamran Riaz Khan [Tue, 9 Aug 2011 17:21:04 +0000 (22:21 +0500)] 
Fix condition reported by nickm.

14 years agoReturn if CONF_CHANGED isn't interesting.
Kamran Riaz Khan [Tue, 9 Aug 2011 10:28:17 +0000 (15:28 +0500)] 
Return if CONF_CHANGED isn't interesting.

14 years agoEscape configuration values before sending them via CONF_CHANGED.
Kamran Riaz Khan [Tue, 9 Aug 2011 10:25:16 +0000 (15:25 +0500)] 
Escape configuration values before sending them via CONF_CHANGED.

14 years agoUse smartlist_asprintf_add() to improve readability.
Kamran Riaz Khan [Tue, 9 Aug 2011 10:18:57 +0000 (15:18 +0500)] 
Use smartlist_asprintf_add() to improve readability.

14 years agoAdd smartlist_[v]asprintf_add
Robert Ransom [Wed, 3 Aug 2011 22:49:39 +0000 (15:49 -0700)] 
Add smartlist_[v]asprintf_add

I should have added this before implementing #2411.

14 years agoMake FooPort 0 correctly disable the FooPort.
Nick Mathewson [Tue, 9 Aug 2011 18:52:22 +0000 (14:52 -0400)] 
Make FooPort 0 correctly disable the FooPort.

Since the prop171 stuff, it had instead made Tor bind port 0, and
re-bind it differently all the time.

Resolves bug3704; not in any released version.

14 years agoSticking a size_t into long generates a warn on win
Sebastian Hahn [Tue, 9 Aug 2011 09:34:21 +0000 (11:34 +0200)] 
Sticking a size_t into long generates a warn on win

14 years agoGet rid of an unused parameter warning on win
Sebastian Hahn [Tue, 9 Aug 2011 09:00:25 +0000 (11:00 +0200)] 
Get rid of an unused parameter warning on win

14 years agoSockets are unsigned on windows
Sebastian Hahn [Tue, 9 Aug 2011 08:59:03 +0000 (10:59 +0200)] 
Sockets are unsigned on windows

this gets rid of a warning about signed/unsigned comparison

14 years agoMinor code readability fix.
Kamran Riaz Khan [Mon, 8 Aug 2011 22:17:21 +0000 (03:17 +0500)] 
Minor code readability fix.

14 years agoAdd changes file.
Kamran Riaz Khan [Mon, 8 Aug 2011 22:02:40 +0000 (03:02 +0500)] 
Add changes file.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Mon, 8 Aug 2011 21:21:39 +0000 (17:21 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoMerge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
Nick Mathewson [Mon, 8 Aug 2011 21:21:21 +0000 (17:21 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2

14 years agoMinor comment fix.
Kamran Riaz Khan [Mon, 8 Aug 2011 14:58:43 +0000 (19:58 +0500)] 
Minor comment fix.

14 years agoUpdate to the August 2011 GeoIP database.
Karsten Loesing [Mon, 8 Aug 2011 14:57:01 +0000 (16:57 +0200)] 
Update to the August 2011 GeoIP database.

14 years agoRefactor to do CONF_CHANGED event formatting inside control.c
Kamran Riaz Khan [Mon, 8 Aug 2011 14:19:06 +0000 (19:19 +0500)] 
Refactor to do CONF_CHANGED event formatting inside control.c

14 years agoMerge remote-tracking branch 'public/bug3550'
Nick Mathewson [Mon, 8 Aug 2011 14:05:41 +0000 (10:05 -0400)] 
Merge remote-tracking branch 'public/bug3550'

14 years agoRemove connection_edge_streams_are_compatible
Robert Ransom [Sat, 6 Aug 2011 20:44:28 +0000 (13:44 -0700)] 
Remove connection_edge_streams_are_compatible

It's dead code (not used anywhere by the current proposal 171 algorithm).

14 years agoFix handling of ISO_STREAM
Robert Ransom [Sat, 6 Aug 2011 20:42:32 +0000 (13:42 -0700)] 
Fix handling of ISO_STREAM

Now we track *which* stream with ISO_STREAM set is associated to a
particular circuit, so that we won't think that stream is incompatible
with its circuit and launch another one a second later, and we use that
same field to mark circuits which have had an ISO_STREAM stream attached
to them, so that we won't ever put a second stream on that circuit.

Fixes bug 3695.

14 years agoEmits CONF_CHANGED events whenever Tor's configuration values change.
Kamran Riaz Khan [Sun, 7 Aug 2011 23:38:53 +0000 (04:38 +0500)] 
Emits CONF_CHANGED events whenever Tor's configuration values change.

14 years agoFix log message typo
Robert Ransom [Sat, 6 Aug 2011 07:25:07 +0000 (00:25 -0700)] 
Fix log message typo

14 years agoMerge remote-tracking branch 'public/bug3683'
Nick Mathewson [Sat, 6 Aug 2011 00:21:27 +0000 (20:21 -0400)] 
Merge remote-tracking branch 'public/bug3683'

14 years agoClear socks auth fields before free
Nick Mathewson [Fri, 5 Aug 2011 23:07:33 +0000 (19:07 -0400)] 
Clear socks auth fields before free

14 years agoHandle storing much longer socks4 authentication data.
Nick Mathewson [Fri, 5 Aug 2011 22:56:30 +0000 (18:56 -0400)] 
Handle storing much longer socks4 authentication data.

14 years agoClean up bridge-stats code.
Karsten Loesing [Thu, 4 Aug 2011 12:45:24 +0000 (14:45 +0200)] 
Clean up bridge-stats code.

Only write a bridge-stats string if bridge stats have been
initialized.  This behavior is similar to dirreq-stats, entry-stats,
etc.

Also add a few unit tests for the bridge-stats code.

14 years agoSeparate generation of an entry-stats string from writing it to disk.
Karsten Loesing [Thu, 4 Aug 2011 12:14:01 +0000 (14:14 +0200)] 
Separate generation of an entry-stats string from writing it to disk.

This commit is similar to the previous two commits for dirreq-stats,
but for entry-stats.

14 years agoSeparate generation of a dirreq-stats string from writing it to disk.
Karsten Loesing [Thu, 4 Aug 2011 10:28:12 +0000 (12:28 +0200)] 
Separate generation of a dirreq-stats string from writing it to disk.

This patch separates the generation of a dirreq-stats string from
actually writing it to disk.  The new geoip_format_dirreq_stats()
generates a dirreq-stats string that geoip_dirreq_stats_write() writes
to disk.  All the state changing (e.g., resetting the dirreq-stats
history and initializing the next measurement interval) takes place in
geoip_dirreq_stats_write().  That allows us to finally test the
dirreq-stats code better.

14 years agoClean up geoip_dirreq_stats_write().
Karsten Loesing [Thu, 4 Aug 2011 09:52:52 +0000 (11:52 +0200)] 
Clean up geoip_dirreq_stats_write().

We later want to split this function into one function that generates
the dirreq-stats string and one that writes it to disk.

14 years agoAdd unit tests for buffer-stats.
Karsten Loesing [Wed, 3 Aug 2011 11:29:03 +0000 (13:29 +0200)] 
Add unit tests for buffer-stats.

Now that formatting the buffer-stats string is separate from writing
it to disk, we can also decouple the logic to extract stats from
circuits and finally write some unit tests for the history code.

14 years agoSeparate generation of a buffer-stats string from writing it to disk.
Karsten Loesing [Wed, 3 Aug 2011 11:26:49 +0000 (13:26 +0200)] 
Separate generation of a buffer-stats string from writing it to disk.

The new rep_hist_format_buffer_stats() generates a buffer-stats string
that rep_hist_buffer_stats_write() writes to disk.  All the state
changing (e.g., resetting the buffer-stats history and initializing
the next measurement interval) takes place in
rep_hist_buffer_stats_write().  That allows us to finally test the
buffer-stats code better.

14 years agoClean up rep_hist_buffer_stats_write().
Karsten Loesing [Wed, 3 Aug 2011 11:34:29 +0000 (13:34 +0200)] 
Clean up rep_hist_buffer_stats_write().

We later want to split this function into one function that generates
the buffer-stats string and one that writes it to disk.

14 years agoCreate cell-stats history even if we didn't see a single circuit.
Karsten Loesing [Wed, 3 Aug 2011 11:33:48 +0000 (13:33 +0200)] 
Create cell-stats history even if we didn't see a single circuit.

So far, if we didn't see a single circuit, we refrained from
generating a cell-stats string and logged a warning.  Nobody will
notice the warning, and people will wonder why there's no cell-stats
string in the extra-info descriptor.  The better behavior is to
generate a cell-stats string with all zeros.

14 years agoReplace files in stats/ rather than appending to them.
Karsten Loesing [Thu, 4 Aug 2011 18:53:53 +0000 (20:53 +0200)] 
Replace files in stats/ rather than appending to them.

Right now, we append statistics to files in the stats/ directory for
half of the statistics, whereas we overwrite these files for the other
half. In particular, we append buffer, dirreq, and entry stats and
overwrite exit, connection, and bridge stats.

Appending to files was useful when we didn't include stats in extra-info
descriptors, because otherwise we'd have to copy them away to prevent
Tor from overwriting them.

But now that we include statistics in extra-info descriptors, it makes
no sense to keep the old statistics forever. We should change the
behavior to overwriting instead of appending for all statistics.

Implements #2930.

14 years agoMake --quiet and --hush apply to default logs, not only initial logs
Nick Mathewson [Thu, 4 Aug 2011 18:23:51 +0000 (14:23 -0400)] 
Make --quiet and --hush apply to default logs, not only initial logs

Fixes bug 3550; bugfix on 0.2.0.10-alpha (where --quiet was introduced).

14 years agoTreat socks_request->{username,password} as non-NUL-terminated
Nick Mathewson [Thu, 4 Aug 2011 16:03:31 +0000 (12:03 -0400)] 
Treat socks_request->{username,password} as non-NUL-terminated

They *are* non-NUL-terminated, after all (and they have to be, since
the SOCKS5 spec allows them to contain embedded NULs.  But the code
to implement proposal 171 was copying them with tor_strdup and
comparing them with strcmp_opt.

Fix for bug on 3683; bug not present in any yet-released version.

14 years agoImplement protocol-type isolation correctly.
Nick Mathewson [Tue, 2 Aug 2011 14:48:39 +0000 (10:48 -0400)] 
Implement protocol-type isolation correctly.

Previously we'd just looked at the connection type, but that's
always CONN_TYPE_AP.  Instead, we should be looking at the type of
the listener that created the connection.

Spotted by rransom; fixes bug 3636.

14 years agoput the 0.2.1.30 stanza in the master changelog too
Roger Dingledine [Mon, 1 Aug 2011 20:14:17 +0000 (16:14 -0400)] 
put the 0.2.1.30 stanza in the master changelog too

14 years agoreach back in time and correct two changelog entries
Roger Dingledine [Mon, 1 Aug 2011 19:53:13 +0000 (15:53 -0400)] 
reach back in time and correct two changelog entries

14 years agoInitial patch to build Tor with msvc and nmake
Nick Mathewson [Mon, 1 Aug 2011 16:36:59 +0000 (12:36 -0400)] 
Initial patch to build Tor with msvc and nmake

We'll still need to tweak it so that it looks for includes and
libraries somewhere more sensible than "where we happened to find
them on Erinn's system"; so that tests and tools get built too;
so that it's a bit documented; and so that we actually try running
the output.

Work done with Erinn Clark.

14 years agoRe-order tor_fw_helper_LDADD flags so that they work
Nick Mathewson [Mon, 1 Aug 2011 15:05:49 +0000 (11:05 -0400)] 
Re-order tor_fw_helper_LDADD flags so that they work

Patch from "blueness".

14 years agoImprove log messages for optimistic data retry
Ian Goldberg [Thu, 21 Jul 2011 13:49:00 +0000 (09:49 -0400)] 
Improve log messages for optimistic data retry

14 years agoAdd src/test/test{-child}.exe to gitignore. bug3626
Nick Mathewson [Thu, 21 Jul 2011 12:40:25 +0000 (08:40 -0400)] 
Add src/test/test{-child}.exe to gitignore. bug3626

14 years agoremember our future plan for bug 3617
Roger Dingledine [Thu, 21 Jul 2011 04:34:58 +0000 (00:34 -0400)] 
remember our future plan for bug 3617

(that is, to change the default for "UseOptimisticData auto" to
1 once we are more convinced that it works correctly.)

14 years agoAdd another precondition for isolation-clearing; fix 3620
Nick Mathewson [Thu, 21 Jul 2011 00:27:36 +0000 (20:27 -0400)] 
Add another precondition for isolation-clearing; fix 3620

14 years agoDo not cannibalize a circuit with isolation values set.
Nick Mathewson [Wed, 20 Jul 2011 18:40:47 +0000 (14:40 -0400)] 
Do not cannibalize a circuit with isolation values set.

14 years agoFor accuracy, s/exit_allows_optimistic_data/may_use_optimistic_data/
Nick Mathewson [Wed, 20 Jul 2011 15:02:39 +0000 (11:02 -0400)] 
For accuracy, s/exit_allows_optimistic_data/may_use_optimistic_data/

14 years agoAdd an OptimisticData option to control client-side optimistic data
Nick Mathewson [Wed, 20 Jul 2011 14:38:00 +0000 (10:38 -0400)] 
Add an OptimisticData option to control client-side optimistic data

14 years agoDon't assert for listener connections
Sebastian Hahn [Wed, 20 Jul 2011 17:42:11 +0000 (19:42 +0200)] 
Don't assert for listener connections

14 years agoCheck for port config before addr config in client port options
Nick Mathewson [Wed, 20 Jul 2011 17:40:09 +0000 (13:40 -0400)] 
Check for port config before addr config in client port options

Otherwise, we'll fail, since "9050" looks like a perfectly fine address.

14 years agoOops: we need to call parse_client_ports with validate_only==0 at least once
Nick Mathewson [Wed, 20 Jul 2011 17:35:02 +0000 (13:35 -0400)] 
Oops: we need to call parse_client_ports with validate_only==0 at least once

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Wed, 20 Jul 2011 17:17:59 +0000 (13:17 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoCheck return value in fmt_addr
Nick Mathewson [Wed, 20 Jul 2011 17:16:06 +0000 (13:16 -0400)] 
Check return value in fmt_addr

Previously, if tor_addr_to_str() returned NULL, we would reuse the
last value returned by fmt_addr().  (This could happen if we were
erroneously asked to format an AF_UNSPEC address.)  Now instead we
return "???".

14 years agoFix a warning message. (Found by rransom)
Nick Mathewson [Wed, 20 Jul 2011 17:15:04 +0000 (13:15 -0400)] 
Fix a warning message. (Found by rransom)

14 years agoInitialize listener connection addr fields properly
Nick Mathewson [Wed, 20 Jul 2011 17:11:29 +0000 (13:11 -0400)] 
Initialize listener connection addr fields properly

14 years agoAdd a missing break in a switch statement
Nick Mathewson [Wed, 20 Jul 2011 16:58:26 +0000 (12:58 -0400)] 
Add a missing break in a switch statement

14 years agoAdd changes file for optimistic client behavior
Nick Mathewson [Wed, 20 Jul 2011 14:44:28 +0000 (10:44 -0400)] 
Add changes file for optimistic client behavior

14 years agoMerge branch 'optimistic-client'
Nick Mathewson [Wed, 20 Jul 2011 13:50:53 +0000 (09:50 -0400)] 
Merge branch 'optimistic-client'

The conflicts are with the proposal 171 circuit isolation code, and
they're all trivial: they're just a matter of both branches adding
some unrelated code in the same places.

Conflicts:
src/or/circuituse.c
src/or/connection.c

14 years agoUnit test for generic_buffer_set_to_copy
Nick Mathewson [Wed, 20 Jul 2011 13:34:19 +0000 (09:34 -0400)] 
Unit test for generic_buffer_set_to_copy

14 years agoMerge remote-tracking branch 'public/prop171_v2'
Nick Mathewson [Wed, 20 Jul 2011 00:43:28 +0000 (20:43 -0400)] 
Merge remote-tracking branch 'public/prop171_v2'

14 years agoFix spurious warning in bufferevent socks parsing
Nick Mathewson [Wed, 20 Jul 2011 00:40:15 +0000 (20:40 -0400)] 
Fix spurious warning in bufferevent socks parsing

The problem was that we weren't initializing want_length to 0 before
calling parse_socks() the first time, so it looked like we were
risking an infinite loop when in fact we were safe.

Fixes 3615; bugfix on 0.2.3.2-alpha.

14 years agoFix a compile warning in config.c reported by sebastian
Nick Mathewson [Tue, 19 Jul 2011 18:04:55 +0000 (14:04 -0400)] 
Fix a compile warning in config.c reported by sebastian

14 years agoTake a smarter approach to clearing isolation info
Nick Mathewson [Tue, 19 Jul 2011 17:51:43 +0000 (13:51 -0400)] 
Take a smarter approach to clearing isolation info

Back when I added this logic in 20c0581a79, the rule was that whenever
a circuit finished building, we cleared its isolation info. I did that
so that we would still use the circuit even if all the streams that
had previously led us to tentatively set its isolation info had closed.

But there were problems with that approach: We could pretty easily get
into a case where S1 had led us to launch C1 and S2 had led us to
launch C2, but when C1 finished, we cleared its isolation and attached
S2 first.  Since C2 was still marked in a way that made S1
unattachable to it, we'd then launch another circuit needlessly.

So instead, we try the following approach now: when a circuit is done
building, we try to attach streams to it.  If it remains unused after
we try attaching streams, then we clear its isolation info, and try
again to attach streams.

Thanks to Sebastian for helping me figure this out.

14 years agoMerge remote-tracking branch 'origin/maint-0.2.2'
Nick Mathewson [Tue, 19 Jul 2011 16:59:10 +0000 (12:59 -0400)] 
Merge remote-tracking branch 'origin/maint-0.2.2'

14 years agoUntangle first sentence of changes/bug3607
Nick Mathewson [Tue, 19 Jul 2011 15:14:01 +0000 (11:14 -0400)] 
Untangle first sentence of changes/bug3607

14 years agoSpecify text or binary mode in every start_writing_to_stdio_file call
Robert Ransom [Tue, 19 Jul 2011 01:12:31 +0000 (18:12 -0700)] 
Specify text or binary mode in every start_writing_to_stdio_file call

14 years agoUse socks username/password information in stream isolation
Nick Mathewson [Tue, 19 Jul 2011 06:36:59 +0000 (02:36 -0400)] 
Use socks username/password information in stream isolation

14 years agoTurn streq_opt into a generic strcmp_opt.
Nick Mathewson [Tue, 19 Jul 2011 06:36:11 +0000 (02:36 -0400)] 
Turn streq_opt into a generic strcmp_opt.

14 years agoManpage updates for proposal 171 (isolated streams)
Nick Mathewson [Fri, 8 Jul 2011 20:37:29 +0000 (16:37 -0400)] 
Manpage updates for proposal 171 (isolated streams)

14 years agoStick controller-originated resolves in their own session group
Nick Mathewson [Fri, 8 Jul 2011 20:00:19 +0000 (16:00 -0400)] 
Stick controller-originated resolves in their own session group

14 years agoImplement sensible isolation for tunneled directory conns
Nick Mathewson [Fri, 8 Jul 2011 19:54:30 +0000 (15:54 -0400)] 
Implement sensible isolation for tunneled directory conns

One-hop dirconn streams all share a session group, and get the
ISO_SESSIONGRP flag: they may share circuits with each other and
nothing else.

Anonymized dirconn streams get a new internal-use-only ISO_STREAM
flag: they may not share circuits with anything, including each other.

14 years agoImplement destaddr-based isolation
Nick Mathewson [Fri, 8 Jul 2011 19:15:59 +0000 (15:15 -0400)] 
Implement destaddr-based isolation

The new candidate rule, which arma suggested and I like, is that
the original address as received from the client connection or as
rewritten by the controller is the address that counts.

14 years agoAdd an option to limit the number of non-open client circuits.
Nick Mathewson [Thu, 7 Jul 2011 18:54:54 +0000 (14:54 -0400)] 
Add an option to limit the number of non-open client circuits.

This is mainly meant as a way to keep clients from accidentally
DOSing themselves by (e.g.) enabling IsolateDestAddr or
IsolateDestPort on a port that they use for HTTP.

14 years agoLaunch sufficient circuits to satisfy pending isolated streams
Nick Mathewson [Thu, 7 Jul 2011 14:40:23 +0000 (10:40 -0400)] 
Launch sufficient circuits to satisfy pending isolated streams

Our old "do we need to launch a circuit for stream S" logic was,
more or less, that if we had a pending circuit that could handle S,
we didn't need to launch a new one.

But now that we have streams isolated from one another, we need
something stronger here: It's possible that some pending C can
handle either S1 or S2, but not both.

This patch reuses the existing isolation logic for a simple
solution: when we decide during circuit launching that some pending
C would satisfy stream S1, we "hypothetically" mark C as though S1
had been connected to it.  Now if S2 is incompatible with S1, it
won't be something that can attach to C, and so we'll launch a new
stream.

When the circuit becomes OPEN for the first time (with no streams
attached to it), we reset the circuit's isolation status.  I'm not
too sure about this part: I wanted some way to be sure that, if all
streams that would have used a circuit die before the circuit is
done, the circuit can still get used.  But I worry that this
approach could also lead to us launching too many circuits.  Careful
thought needed here.

14 years agoImplement stream isolation
Nick Mathewson [Wed, 6 Jul 2011 21:08:24 +0000 (17:08 -0400)] 
Implement stream isolation

This is the meat of proposal 171: we change circuit_is_acceptable()
to require that the connection is compatible with every connection
that has been linked to the circuit; we update circuit_is_better to
prefer attaching streams to circuits in the way that decreases the
circuits' usefulness the least; and we update link_apconn_to_circ()
to do the appropriate bookkeeping.

14 years agoAdd a new isolation type and field: "nym epoch"
Nick Mathewson [Wed, 6 Jul 2011 20:39:54 +0000 (16:39 -0400)] 
Add a new isolation type and field: "nym epoch"

The "nym epoch" of a stream is defined as the number of times that
NEWNYM had been called before the stream was opened.  All streams
are isolated by nym epoch.

This feature should be redundant with existing signewnym stuff, but
it provides a good belt-and-suspenders way for us to avoid ever
letting any circuit type bypass signewnym.

14 years agoConst-ify a few functions
Nick Mathewson [Wed, 6 Jul 2011 20:30:02 +0000 (16:30 -0400)] 
Const-ify a few functions

14 years ago(Unused) backend logic for stream isolation
Nick Mathewson [Wed, 6 Jul 2011 20:03:47 +0000 (16:03 -0400)] 
(Unused) backend logic for stream isolation

This patch adds fields to track how streams should be isolated, and
ensures that those fields are set correctly.  It also adds fields to
track what streams can go on a circuit, and adds functions to see
whether a streams can go on a circuit and update the circuit
accordingly.  Those functions aren't yet called.