commit 172f8acbe7fcdf6b025ad87c81760ef45bbe1d53 Author: Nick Mathewson nickm@torproject.org Date: Fri Jul 8 16:00:19 2011 -0400
Stick controller-originated resolves in their own session group --- src/or/dnsserv.c | 4 ++++ src/or/or.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index c81d72f..35279c4 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -184,7 +184,11 @@ dnsserv_launch_request(const char *name, int reverse)
strlcpy(conn->socks_request->address, name, sizeof(conn->socks_request->address)); + conn->original_dest_address = tor_strdup(name); + conn->session_group = SESSION_GROUP_CONTROL_RESOLVE; + conn->nym_epoch = get_signewnym_epoch(); + conn->isolation_flags = ISO_DEFAULT;
if (connection_add(TO_CONN(conn))<0) { log_warn(LD_APP, "Couldn't register dummy connection for RESOLVE request"); diff --git a/src/or/or.h b/src/or/or.h index 26e9970..835f279 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2653,8 +2653,10 @@ typedef enum invalid_router_usage_t { #define SESSION_GROUP_UNSET -1 /** Session group reserved for directory connections */ #define SESSION_GROUP_DIRCONN -2 +/** Session group reserved for resolve requests launched by a controller */ +#define SESSION_GROUP_CONTROL_RESOLVE -3 /** First automatically allocated session group number */ -#define SESSION_GROUP_FIRST_AUTO -3 +#define SESSION_GROUP_FIRST_AUTO -4
/** Configuration for a single port that we're listening on. */ typedef struct port_cfg_t {
tor-commits@lists.torproject.org