aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-11-24 02:08:46 +0000
committerRoger Dingledine <arma@torproject.org>2008-11-24 02:08:46 +0000
commitd9c7db698524a8a5069a6192119125d8ddc117f1 (patch)
treed31ff35793b0eaa172ff0e0288ec412344c986eb
parenta56973d37a31258148c41bb8cc8c4bf1717625d8 (diff)
downloadtorspec-d9c7db698524a8a5069a6192119125d8ddc117f1.tar.gz
torspec-d9c7db698524a8a5069a6192119125d8ddc117f1.zip
don't lose a patch that mwenge wrote to put different destination
ports on different streams. one day i will make this into a real proposal, and argue we should put it in. svn:r17380
-rw-r--r--proposals/ideas/xxx-separate-streams-by-port.txt61
1 files changed, 61 insertions, 0 deletions
diff --git a/proposals/ideas/xxx-separate-streams-by-port.txt b/proposals/ideas/xxx-separate-streams-by-port.txt
new file mode 100644
index 0000000..cebde65
--- /dev/null
+++ b/proposals/ideas/xxx-separate-streams-by-port.txt
@@ -0,0 +1,61 @@
+Filename: xxx-separate-streams-by-port.txt
+Title: Separate streams across circuits by destination port
+Version: $Revision$
+Last-Modified: $Date$
+Author: Robert Hogan
+Created: 21-Oct-2008
+Status: Draft
+
+Here's a patch Robert Hogan wrote to use only one destination port per
+circuit. It's based on a wishlist item Roger wrote, to never send AIM
+usernames over the same circuit that we're hoping to browse anonymously
+through. The remaining open question is: how many extra circuits does this
+cause an ordinary user to create? My guess is not very many, but I'm wary
+of putting this in until we have some better estimate. On the other hand,
+not putting it in means that we have a known security flaw. Hm.
+
+Index: src/or/or.h
+===================================================================
+--- src/or/or.h (revision 17143)
++++ src/or/or.h (working copy)
+@@ -1874,6 +1874,7 @@
+
+ uint8_t state; /**< Current status of this circuit. */
+ uint8_t purpose; /**< Why are we creating this circuit? */
++ uint16_t service; /**< Port conn must have to use this circuit. */
+
+ /** How many relay data cells can we package (read from edge streams)
+ * on this circuit before we receive a circuit-level sendme cell asking
+Index: src/or/circuituse.c
+===================================================================
+--- src/or/circuituse.c (revision 17143)
++++ src/or/circuituse.c (working copy)
+@@ -62,10 +62,16 @@
+ return 0;
+ }
+
+- if (purpose == CIRCUIT_PURPOSE_C_GENERAL)
++ if (purpose == CIRCUIT_PURPOSE_C_GENERAL) {
+ if (circ->timestamp_dirty &&
+ circ->timestamp_dirty+get_options()->MaxCircuitDirtiness <= now)
+ return 0;
++ /* If the circuit is dirty and used for services on another port,
++ then it is not suitable. */
++ if (circ->service && conn->socks_request->port &&
++ (circ->service != conn->socks_request->port))
++ return 0;
++ }
+
+ /* decide if this circ is suitable for this conn */
+
+@@ -1351,7 +1357,9 @@
+ if (connection_ap_handshake_send_resolve(conn) < 0)
+ return -1;
+ }
+-
++ if (conn->socks_request->port
++ && (TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_C_GENERAL))
++ TO_CIRCUIT(circ)->service = conn->socks_request->port;
+ return 1;
+ }
+