Fix DNS server fd garbage collection.
If we're talking to upstream servers from a fixed port, specified by query-port we create the fds to do this once, before dropping root, so that ports <1024 can be used. But we call check_servers() before reading /etc/resolv.conf, so if the only servers are in resolv.conf, at that point there will be no servers, and the fds get garbage collected away, only to be recreated (but without root) after we read /etc/resolv.conf Make pre-allocated server fds immortal, to avoid this problem.
Showing
Please register or sign in to comment