dns: Wake up a dormant tor with a DNSPort request

Fixes #40577

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2022-03-15 12:12:57 -04:00
parent 1934e24469
commit 1760a12f83
2 changed files with 6 additions and 0 deletions

3
changes/ticket40577 Normal file
View File

@ -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.

View File

@ -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. */