summaryrefslogtreecommitdiff
path: root/src/feature/client/dnsserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-13 15:33:46 -0500
committerNick Mathewson <nickm@torproject.org>2018-11-15 11:17:22 -0500
commit2c15b6538123047c258987b00475fa658ca14878 (patch)
tree6a01a36619cd1df7228b9a50e20a15087d3e014e /src/feature/client/dnsserv.c
parentccbb36048f5167b9d5011b7c8b0d2c346ce567e8 (diff)
downloadtor-2c15b6538123047c258987b00475fa658ca14878.tar.gz
tor-2c15b6538123047c258987b00475fa658ca14878.zip
Make the NET_PARTICIPANT role dependent on user activity
This patch implements all of 28337, except for the part where we turn off the role if we've been idle for a long time.
Diffstat (limited to 'src/feature/client/dnsserv.c')
-rw-r--r--src/feature/client/dnsserv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/feature/client/dnsserv.c b/src/feature/client/dnsserv.c
index ea4951f915..e5abe5c6aa 100644
--- a/src/feature/client/dnsserv.c
+++ b/src/feature/client/dnsserv.c
@@ -28,6 +28,7 @@
#include "core/or/connection_edge.h"
#include "feature/control/control.h"
#include "core/mainloop/mainloop.h"
+#include "core/mainloop/netstatus.h"
#include "core/or/policies.h"
#include "feature/control/control_connection_st.h"
@@ -213,6 +214,9 @@ dnsserv_launch_request(const char *name, int reverse,
edge_connection_t *conn;
char *q_name;
+ /* Launching a request for a user counts as user activity. */
+ note_user_activity(approx_time());
+
/* Make a new dummy AP connection, and attach the request to it. */
entry_conn = entry_connection_new(CONN_TYPE_AP, AF_INET);
entry_conn->entry_cfg.dns_request = 1;