[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #21900 [Core Tor/Tor]: evdns fails when resolv.conf is missing, but succeeds when resolv.conf is empty
#21900: evdns fails when resolv.conf is missing, but succeeds when resolv.conf is
empty
------------------------------+---------------------------------
Reporter: teor | Owner:
Type: defect | Status: new
Priority: Medium | Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Keywords: technical-debt, dns
Actual Points: | Parent ID:
Points: 2 | Reviewer:
Sponsor: |
------------------------------+---------------------------------
When tor's ServerDNSResolvConfFile (default /etc/resolv.conf) is missing,
evdns does not add any name servers, and therefore Exits do not allow any
exit traffic (not even IP-based traffic):
{{{
[debug] configure_nameservers: stat()ing /etc/resolv.conf
[warn] Unable to stat resolver configuration in '/etc/resolv.conf': No
such file or directory
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor:
dns resolvers failed
}}}
This happens on macOS when the network is down. On macOS, /etc/resolv.conf
is symlinked to /var/run/resolv.conf. When the network is down, macOS
deletes /var/run/resolv.conf, so the stat() call on /etc/resolv.conf
fails.
But when tor's ServerDNSResolvConfFile is empty, evdns adds a default name
server (127.0.0.1:53 on my macOS), and therefore Exits allow exit traffic:
{{{
[info] eventdns: Parsing resolv.conf file /dev/null
[info] eventdns: Added nameserver 127.0.0.1:53 as 0x615000009e00
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor:
dns resolvers failed
[info] eventdns: Parsing resolv.conf file /dev/null
...
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor:
dns resolvers back
}}}
We should also stop the extra descriptor upload:
{{{
[info] mark_my_descriptor_dirty: Decided to publish new relay descriptor:
dns resolvers failed
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21900>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs