Underscore in name causes SRVFAIL without error message
Summary
After adding entries in a zone file, I got SRVFAIL errors for lookups in this zone. However, I got no error messages about what was wrong. By reverting the changes and trying them step by step I found out that a name entry with an underscore cause the problem:
name_with_underscore IN A 10.1.1.1
BIND version used
(Paste the output of named -V
.)
BIND 9.11.2 <id:0a2b929>
running on Linux x86_64 4.19.105-rk #1 SMP Thu Feb 20 09:48:04 CET 2020
built by make with '--host=x86_64-suse-linux-gnu' '--build=x86_64-suse-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/lib' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--with-python=/usr/bin/python3' '--includedir=/usr/include/bind' '--disable-static' '--with-openssl' '--enable-threads' '--with-libtool' '--with-libxml2' '--with-libjson' '--with-dlz-mysql' '--with-dlz-ldap' '--with-randomdev=/dev/urandom' '--enable-ipv6' '--with-pic' '--disable-openssl-version-check' '--with-tuning=large' '--with-geoip' '--with-dlopen' '--with-gssapi=yes' '--disable-isc-spnego' '--enable-fixed-rrset' '--enable-filter-aaaa' '--with-systemd' '--enable-full-report' 'build_alias=x86_64-suse-linux-gnu' 'host_alias=x86_64-suse-linux-gnu' 'CFLAGS=-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g'
compiled by GCC 7.4.1 20190424 [gcc-7-branch revision 270538]
compiled with OpenSSL version: OpenSSL 1.1.0i 14 Aug 2018
linked to OpenSSL version: OpenSSL 1.1.0i-fips 14 Aug 2018
compiled with libxml2 version: 2.9.7
linked to libxml2 version: 20907
compiled with libjson-c version: 0.13
linked to libjson-c version: 0.13
compiled with zlib version: 1.2.11
linked to zlib version: 1.2.11
threads support is enabled
Steps to reproduce
Add a zone entry with an underscore in the name.
What is the current bug behavior?
Lookups fail with SRVFAIL
What is the expected correct behavior?
There should be an error / a warning message about invalid name entries on startup. The invalid entries could be ignored so at least the other entries work.
Relevant logs and/or screenshots
# nslookup tst01
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can't find tst01.intern: SERVFAIL