fix ptr nxdomain response and test (#1524)
This commit is contained in:
parent
ca5097ca13
commit
caf2553d7a
2 changed files with 4 additions and 1 deletions
|
@ -18,6 +18,9 @@ func (k *Kubernetes) Reverse(state request.Request, exact bool, opt plugin.Optio
|
|||
}
|
||||
|
||||
records := k.serviceRecordForIP(ip, state.Name())
|
||||
if len(records) == 0 {
|
||||
return records, errNoItems
|
||||
}
|
||||
return records, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ func TestReverse(t *testing.T) {
|
|||
},
|
||||
{
|
||||
Qname: "101.0.0.10.in-addr.arpa.", Qtype: dns.TypePTR,
|
||||
Rcode: dns.RcodeSuccess,
|
||||
Rcode: dns.RcodeNameError,
|
||||
Ns: []dns.RR{
|
||||
test.SOA("0.10.in-addr.arpa. 300 IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"),
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue