summaryrefslogtreecommitdiff
path: root/src/or/dnsserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-06 16:39:54 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-19 01:58:45 -0400
commit1d3c8c1f74e9f80317a70c3b7d9372dee87dd373 (patch)
tree6242d395e4bef2f9e3cba3e5fcb0c7843b91b9fa /src/or/dnsserv.c
parent461623e7f980e8d599829865caf3b3985117004a (diff)
downloadtor-1d3c8c1f74e9f80317a70c3b7d9372dee87dd373.tar.gz
tor-1d3c8c1f74e9f80317a70c3b7d9372dee87dd373.zip
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.
Diffstat (limited to 'src/or/dnsserv.c')
-rw-r--r--src/or/dnsserv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c
index b1316ecc6a..8612b4850f 100644
--- a/src/or/dnsserv.c
+++ b/src/or/dnsserv.c
@@ -134,6 +134,7 @@ evdns_server_callback(struct evdns_server_request *req, void *data_)
conn->dns_server_request = req;
conn->isolation_flags = listener->isolation_flags;
conn->session_group = listener->session_group;
+ conn->nym_epoch = get_signewnym_epoch();
if (connection_add(TO_CONN(conn)) < 0) {
log_warn(LD_APP, "Couldn't register dummy connection for DNS request");