plugin/file: fix label offset problem in ClosestEncloser (#7465)

Signed-off-by: yuwenchao <ywc689@163.com>
This commit is contained in:
wencyu
2025-08-21 07:02:41 +08:00
committed by GitHub
parent 2b273d48ab
commit 2c99f62acb
2 changed files with 2 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ func (z *Zone) ClosestEncloser(qname string) (*tree.Elem, bool) {
}
qname = qname[offset:]
offset, end = dns.NextLabel(qname, offset)
offset, end = dns.NextLabel(qname, 0)
}
return z.Search(z.origin)