ALIDNS: Exclude NS records from TTL warning messages

This commit is contained in:
artin 2025-12-04 02:49:54 +08:00
parent 528a8105eb
commit f3bef39caa

View file

@ -179,8 +179,10 @@ func (a *aliDNSDsp) PrepDesiredRecords(dc *models.DomainConfig) {
} }
if rec.TTL < versionInfo.minTTL { if rec.TTL < versionInfo.minTTL {
printer.Warnf("record %s has TTL %d which is below the minimum %d for this domain version (%s)\n", if rec.Type != "NS" {
rec.GetLabelFQDN(), rec.TTL, versionInfo.minTTL, versionInfo.versionCode) printer.Warnf("record %s has TTL %d which is below the minimum %d for this domain version (%s)\n",
rec.GetLabelFQDN(), rec.TTL, versionInfo.minTTL, versionInfo.versionCode)
}
rec.TTL = versionInfo.minTTL rec.TTL = versionInfo.minTTL
} }
if rec.TTL > versionInfo.maxTTL { if rec.TTL > versionInfo.maxTTL {