mirror of
https://github.com/coredns/coredns.git
synced 2026-05-26 11:50:24 -04:00
The miekg/dns zone parser preserves whichever text form the input used for an escaped byte. RFC 1035 §5.1 lets the same byte appear as \DDD (decimal) or \c (literal character), so a zone file written with has\046dot.campus.edu. is stored under that literal string. Incoming queries, by contrast, arrive on the wire and are unpacked by miekg/dns into the canonical form has\.dot.campus.edu. The two strings don't compare equal in the tree, so the record is silently unreachable. Pack-then-unpack the owner name on Insert so the stored key uses the same canonical form as anything that comes off the wire. Only runs when the name contains a backslash, so the common case is a no-op string compare. Fixes #8012 Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
5.7 KiB
5.7 KiB