mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
all: use local resolver for ADDC
For normal OS resolver, ctrld does not use local addresses as nameserver to avoid possible looping. However, on AD environment with local DNS running, AD queries must be sent to the local DNS server for proper resolving.
This commit is contained in:
committed by
Cuong Manh Le
parent
69e0aab73e
commit
20759017e6
@@ -384,7 +384,7 @@ func (uc *UpstreamConfig) IsDiscoverable() bool {
|
||||
return *uc.Discoverable
|
||||
}
|
||||
switch uc.Type {
|
||||
case ResolverTypeOS, ResolverTypeLegacy, ResolverTypePrivate:
|
||||
case ResolverTypeOS, ResolverTypeLegacy, ResolverTypePrivate, ResolverTypeLocal:
|
||||
if ip, err := netip.ParseAddr(uc.Domain); err == nil {
|
||||
return ip.IsLoopback() || ip.IsPrivate() || ip.IsLinkLocalUnicast() || tsaddr.CGNATRange().Contains(ip)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user