all: ignoring local interfaces RFC1918 IP for private resolver

Otherwises, the discovery may make a looping with new PTR query flow.
This commit is contained in:
Cuong Manh Le
2023-12-05 01:29:31 +07:00
committed by Cuong Manh Le
parent 5897c174d3
commit c3ff8182af
3 changed files with 29 additions and 18 deletions
+1 -1
View File
@@ -438,7 +438,7 @@ func (p *prog) setDNS() {
nameservers := []string{ns}
if needRFC1918Listeners(lc) {
nameservers = append(nameservers, rfc1918Addresses()...)
nameservers = append(nameservers, ctrld.Rfc1918Addresses()...)
}
if err := setDNS(netIface, nameservers); err != nil {
logger.Error().Err(err).Msgf("could not set DNS for interface")