Do reverse service lookup only if address doesn't match node
This commit is contained in:
parent
e8d0474a8e
commit
cea77e8825
|
@ -208,6 +208,8 @@ func (d *DNSServer) handlePtr(resp dns.ResponseWriter, req *dns.Msg) {
|
|||
}
|
||||
}
|
||||
|
||||
// only look into the services if we didn't find a node
|
||||
if len(m.Answer) == 0 {
|
||||
// lookup the service address
|
||||
serviceAddress := dnsutil.ExtractAddressFromReverse(qName)
|
||||
sargs := structs.ServiceSpecificRequest{
|
||||
|
@ -232,6 +234,7 @@ func (d *DNSServer) handlePtr(resp dns.ResponseWriter, req *dns.Msg) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// nothing found locally, recurse
|
||||
if len(m.Answer) == 0 {
|
||||
|
|
Loading…
Reference in a new issue