mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
fix NXDOMAIN/NODATA fallthough case (#3118)
This commit is contained in:
committed by
Miek Gieben
parent
555e4877ae
commit
a64ff8cc0a
@@ -54,7 +54,9 @@ func (k Kubernetes) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.M
|
||||
fallthrough
|
||||
default:
|
||||
// Do a fake A lookup, so we can distinguish between NODATA and NXDOMAIN
|
||||
_, err = plugin.A(ctx, &k, zone, state, nil, plugin.Options{})
|
||||
fake := state.NewWithQuestion(state.QName(), dns.TypeA)
|
||||
fake.Zone = state.Zone
|
||||
_, err = plugin.A(ctx, &k, zone, fake, nil, plugin.Options{})
|
||||
}
|
||||
|
||||
if k.IsNameError(err) {
|
||||
|
||||
Reference in New Issue
Block a user