• Simon Kelley's avatar
    Fix DNS server fd garbage collection. · 4441cf76
    Simon Kelley authored
    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.
    4441cf76
dnsmasq.h 47.9 KB