plugin/etcd: avoid apex fallback on backend errors (#8465)

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
This commit is contained in:
houyuwushang
2026-08-20 17:24:12 +08:00
committed by GitHub
parent 992d4c20db
commit 4b26cced32
3 changed files with 78 additions and 16 deletions

View File

@@ -523,12 +523,11 @@ func checkForApex(ctx context.Context, b ServiceBackend, zone string, state requ
state.Req.Question[0].Name = dnsutil.Join("apex.dns", zone)
services, err := b.Services(ctx, state, false, opt)
if err == nil {
state.Req.Question[0].Name = old
state.Req.Question[0].Name = old
if err == nil || !b.IsNameError(err) {
return services, err
}
state.Req.Question[0].Name = old
return b.Services(ctx, state, false, opt)
}