Skip to content

Commit

Permalink
Fix NS line for the zone file
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rabin-io committed Sep 14, 2023
1 parent 64799ca commit 901f007
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/zonemgr/internal/zone-file-cache/zone_file_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 901f007

Please sign in to comment.