name resolution with libc
Hello! I operate an exit relay on FreeBSD. I changed the values in resolv.conf (that file lists the actual nameservers, not a local resolver), but tor DNS traffic was still sent to the old servers for days until I restarted tor. How is that handled in tor? -- Gruß Marco Send unsolicited bulk mail to 1768731494muell@stinkedores.dorfdsl.de
Hey, I run a tor exit on FreeBSD too and didn't know this about the resolvers, good thing to know. And as far as i know, a reload of tor would've sufficed instead of a restart (even changes ports without restart), this won't reset your uptime on the relay. Sending this message through different means now, since via my mail client apparently didn't do so well. So this messages might be received twice. Kind regards, Dennis Bronk.
On Sun, Jan 18, 2026 at 11:21:13AM +0100, Marco Moock via tor-relays wrote:
How is that handled in tor?
I remember having worked on this a long long time ago. As far as I remember properly, the CTor implementation does not use libc for resolving names, but rather libevent, in order to resolve them asynchronously. There were some caveats wrt to resolvers outlined in the libevent documentation, maybe it is worth looking into that? Thank You Clara
Am 19.01.2026 um 10:11:13 Uhr schrieb Clara Engler:
As far as I remember properly, the CTor implementation does not use libc for resolving names, but rather libevent, in order to resolve them asynchronously.
There were some caveats wrt to resolvers outlined in the libevent documentation, maybe it is worth looking into that?
Thanks for the clarification. How does libevent handle that? Does it only read /etc/resolv.conf at the start? Does it care about nsswitch.conf, e.g. also the nscd cache? -- Gruß Marco Send unsolicited bulk mail to 1768813873muell@cartoonies.org
participants (3)
-
Clara Engler -
Dennis Bronk -
Marco Moock