aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.h
diff options
context:
space:
mode:
authorRobert Hogan <robert@roberthogan.net>2010-08-06 20:29:15 +0100
committerRobert Hogan <robert@roberthogan.net>2010-08-08 12:37:59 +0100
commit462568674a2465e8eb9cbb1cda65fa3e736c99fd (patch)
treed32105b4c399849dcf590d034cb8b979bb994970 /src/or/connection_edge.h
parentf060b18e6c4292be58de0e1b08f25b770cbddff8 (diff)
downloadtor-462568674a2465e8eb9cbb1cda65fa3e736c99fd.tar
tor-462568674a2465e8eb9cbb1cda65fa3e736c99fd.tar.gz
Ensure controller RESOLVE commands respect __LeaveStreamsUnattached
https://trac.torproject.org/projects/tor/ticket/1525 "The codepath taken by the control port "RESOLVE" command to create a synthetic SOCKS resolve request isn't the same as the path taken by a real SOCKS request from 'tor-resolve'. This prevents controllers who set LeaveStreamsUnattached=1 from being able to attach RESOLVE streams to circuits of their choosing." Create a new function connection_ap_rewrite_and_attach_if_allowed() and call that when Tor needs to attach a stream to a circuit but needs to know if the controller permits it. No tests added.
Diffstat (limited to 'src/or/connection_edge.h')
-rw-r--r--src/or/connection_edge.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h
index c3d6098c5..85444503b 100644
--- a/src/or/connection_edge.h
+++ b/src/or/connection_edge.h
@@ -79,6 +79,9 @@ void client_dns_set_addressmap(const char *address, uint32_t val,
const char *addressmap_register_virtual_address(int type, char *new_address);
void addressmap_get_mappings(smartlist_t *sl, time_t min_expires,
time_t max_expires, int want_expiry);
+int connection_ap_rewrite_and_attach_if_allowed(edge_connection_t *conn,
+ origin_circuit_t *circ,
+ crypt_path_t *cpath);
int connection_ap_handshake_rewrite_and_attach(edge_connection_t *conn,
origin_circuit_t *circ,
crypt_path_t *cpath);