Ensure SOA is always the first record in the list
This commit is contained in:
parent
5ff353079d
commit
64d559e7dd
|
@ -190,6 +190,14 @@ func (z *Zone) GenerateRRs(origin string) (rrs models.Records) {
|
|||
}
|
||||
rrs = append(rrs, svc.GenRRs(subdomain, ttl, origin)...)
|
||||
}
|
||||
|
||||
// Ensure SOA is the first record
|
||||
for i, rr := range rrs {
|
||||
if rr.Type == "SOA" {
|
||||
rrs[0], rrs[i] = rrs[i], rrs[0]
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue