dns: sort zones when writing data

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-10-29 02:25:33 +00:00
parent 9ab7594bcc
commit abe3005769
2 changed files with 13 additions and 2 deletions
+3 -2
View File
@@ -14,12 +14,13 @@ func (mgr *Manager) WriteTo(w io.Writer) (int64, error) {
cache := make(map[string][]netip.Addr)
// zones
for _, z := range mgr.zones {
for _, zoneName := range mgr.genZonesSorted() {
z := mgr.zones[zoneName]
mgr.writeZoneHosts(&buf, z)
// zone alias
addrs := mgr.genZoneAddresses(z)
zoneName := z.Name
rr := AddrRecord{
Name: mgr.fqdn(zoneName + mgr.suffix),