commit 1760a12f8373d10a348ae5eb5bb4ad69406a34c3
parent 1934e24469bf7184b825efe2b9b0436b1bc35695
Author: David Goulet <dgoulet@torproject.org>
Date: Tue, 15 Mar 2022 12:12:57 -0400
dns: Wake up a dormant tor with a DNSPort request
Fixes #40577
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/changes/ticket40577 b/changes/ticket40577
@@ -0,0 +1,3 @@
+ o Minor bugfixes (DNSPort, dormant mode):
+ - A request on the DNSPort now wakes up a dormant tor. Fixes bug 40577;
+ bugfix on 0.3.5.1-alpha.
diff --git a/src/feature/client/dnsserv.c b/src/feature/client/dnsserv.c
@@ -65,6 +65,9 @@ evdns_server_callback(struct evdns_server_request *req, void *data_)
log_info(LD_APP, "Got a new DNS request!");
+ /* Receiving a request on the DNSPort counts as user activity. */
+ note_user_activity(approx_time());
+
req->flags |= 0x80; /* set RA */
/* First, check whether the requesting address matches our SOCKSPolicy. */