FIX: Don't output SOA RRSIG twice when not using -b.

This commit is contained in:
Ximon Eighteen
2024-12-09 12:43:58 +01:00
parent 8331b5cc4b
commit 57aeaa5aa8
+10 -9
View File
@@ -855,16 +855,17 @@ impl SignZone {
if let Some(record) = records.iter().find(|r| r.rtype() == Rtype::SOA) {
writer.write_fmt(format_args!("{}\n", record.display_zonefile(DISPLAY_KIND)))?;
if let Some(record) = records.iter().find(|r| {
if let ZoneRecordData::Rrsig(rrsig) = r.data() {
rrsig.type_covered() == Rtype::SOA
} else {
false
}
}) {
writer.write_fmt(format_args!("{}\n", record.display_zonefile(DISPLAY_KIND)))?;
}
if self.extra_comments {
if let Some(record) = records.iter().find(|r| {
if let ZoneRecordData::Rrsig(rrsig) = r.data() {
rrsig.type_covered() == Rtype::SOA
} else {
false
}
}) {
writer
.write_fmt(format_args!("{}\n", record.display_zonefile(DISPLAY_KIND)))?;
}
writer.write_str(";\n")?;
}
}