diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-08-02 10:48:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-08-02 10:48:39 -0400 |
commit | 6596aa022f03bad34a3ee9cbd627fefe55c01d54 (patch) | |
tree | cf6ea9a451ed365e59c5b8a0389e614636672f90 /src/or/dnsserv.c | |
parent | 478785a762ebbfc1c95192d9cfd4617bd87d9d16 (diff) | |
download | tor-6596aa022f03bad34a3ee9cbd627fefe55c01d54.tar.gz tor-6596aa022f03bad34a3ee9cbd627fefe55c01d54.zip |
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.
Diffstat (limited to 'src/or/dnsserv.c')
-rw-r--r-- | src/or/dnsserv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index 35279c4702..19d0427b2d 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -131,6 +131,7 @@ evdns_server_callback(struct evdns_server_request *req, void *data_) strlcpy(conn->socks_request->address, q->name, sizeof(conn->socks_request->address)); + conn->socks_request->listener_type = listener->_base.type; conn->dns_server_request = req; conn->isolation_flags = listener->isolation_flags; conn->session_group = listener->session_group; @@ -185,6 +186,7 @@ dnsserv_launch_request(const char *name, int reverse) strlcpy(conn->socks_request->address, name, sizeof(conn->socks_request->address)); + conn->socks_request->listener_type = CONN_TYPE_CONTROL_LISTENER; conn->original_dest_address = tor_strdup(name); conn->session_group = SESSION_GROUP_CONTROL_RESOLVE; conn->nym_epoch = get_signewnym_epoch(); |