From 901f007cd1be75aa683d11b2e2b383a9b9f9b8a2 Mon Sep 17 00:00:00 2001 From: Rabin Yasharzadehe Date: Thu, 14 Sep 2023 16:08:07 +0300 Subject: [PATCH] Fix NS line for the zone file There was a missing `@` at the beginning of the NS record, which caused the line to be invalid, and we didn't get any alerts about it on zone re/load. This also broke recourse query for the NS, as the query will be passed to the internal DNS, but the record is missing. Signed-off-by: Rabin Yasharzadehe --- pkg/zonemgr/internal/zone-file-cache/zone_file_cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/zonemgr/internal/zone-file-cache/zone_file_cache.go b/pkg/zonemgr/internal/zone-file-cache/zone_file_cache.go index af37625..923e401 100644 --- a/pkg/zonemgr/internal/zone-file-cache/zone_file_cache.go +++ b/pkg/zonemgr/internal/zone-file-cache/zone_file_cache.go @@ -76,7 +76,7 @@ func (zoneFileCache *ZoneFileCache) generateHeaderSuffix() { zoneFileCache.headerSuf = fmt.Sprintf(" %s %s %s %s)\n", refresh, retry, expire, ttl) if zoneFileCache.nameServerIP != "" { - zoneFileCache.headerSuf += fmt.Sprintf("IN NS %s.\n", zoneFileCache.nameServerName) + zoneFileCache.headerSuf += fmt.Sprintf("@ IN NS %s.\n", zoneFileCache.nameServerName) zoneFileCache.headerSuf += fmt.Sprintf("%s IN A %s\n", nameServerDefault, zoneFileCache.nameServerIP) } }