dnsforward: fix http rdns check

This commit is contained in:
Eugene Burkov 2024-05-22 13:11:58 +03:00
parent 5eaa024b11
commit ee7202a7b4
1 changed files with 7 additions and 1 deletions

View File

@ -340,7 +340,13 @@ func (req *jsonDNSConfig) checkPrivateRDNS(
sysResolvers SystemResolvers, sysResolvers SystemResolvers,
privateNets netutil.SubnetSet, privateNets netutil.SubnetSet,
) (err error) { ) (err error) {
if (req.UsePrivateRDNS == nil || !*req.UsePrivateRDNS) && req.LocalPTRUpstreams == nil { switch {
case
req.UsePrivateRDNS != nil && *req.UsePrivateRDNS,
req.LocalPTRUpstreams != nil && len(*req.LocalPTRUpstreams) > 0:
// Only check the private RDNS servers if its usage has just been
// enabled or if it contains any addresses.
default:
return nil return nil
} }