From d2dac347eb55eb97635aa6722b8f3a1f00a8c349 Mon Sep 17 00:00:00 2001 From: Jannik Peters Date: Fri, 13 Dec 2024 13:38:57 +0100 Subject: [PATCH] Clarify comments on ZONEMD records and placeholders --- src/commands/signzone.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/commands/signzone.rs b/src/commands/signzone.rs index 73a635e..3fb5fa4 100644 --- a/src/commands/signzone.rs +++ b/src/commands/signzone.rs @@ -906,7 +906,7 @@ impl SignZone { } if !zonemd.is_empty() { - // Remove existing ZONEMD RRs at apex (the placeholder is no longer needed) + // Remove the placeholder ZONEMD RR at apex let _ = records.remove_first_by_name_class_rtype( apex.owner().clone(), None, @@ -920,7 +920,7 @@ impl SignZone { records.extend(zonemd_rrs.clone().into_iter().map(Record::from_record)); if signing_mode == SigningMode::HashAndSign { - self.update_zonemd_rrsig(&signer, &mut records, &apex, signing_keys, zonemd_rrs); + Self::update_zonemd_rrsig(&signer, &mut records, &apex, signing_keys, zonemd_rrs); } } @@ -1471,8 +1471,8 @@ impl SignZone { let _ = records.remove_all_by_name_class_rtype(apex.owner().clone(), None, Some(Rtype::ZONEMD)); - // Insert placeholder ZONEMD at apex for - // correct NSEC(3) bitmap (will be replaced later). + // Insert a single placeholder ZONEMD at apex for creating the + // correct NSEC(3) bitmap (the ZONEMD RR will be replaced later). let placeholder_zonemd = ZoneRecordData::Zonemd(Zonemd::new( soa_serial, ZonemdScheme::from_int(0), @@ -1522,7 +1522,6 @@ impl SignZone { } fn update_zonemd_rrsig( - &self, signer: &Signer, records: &mut SortedRecords, ZoneRecordData>, Sort>, apex: &FamilyName>,