feat: add matching PTR for A & AAAA records
add an option to update PTR when editing A or AAAA records
(if reverse zone exists and user has permission to edit PTR)
Hmm I thought the email in the mailing list was about the opposite. What I have is when creating the PTR record, automatically create the forward one; because we also have a small patch that tells us the first available IP in a reverse zone in NicTool. I will submit that one and will look into this one.
Having the PTR automagically created/updated when adding/updating an A or AAA record would be a very helpful feature! :yum: I want to replace Webmin with NicTool at my work, but this would be a missing feature.
I just noticed this in tinydns/export this line:
sub zr_aaaa {
my $self = shift;
my $r = shift or die;
my $aaaa = $self->expand_aaaa( $r->{address} );
# from AAAA notation (8 groups of 4 hex digits) to 16 escaped octals
my $rdata = $self->pack_hex( join '', split /:/, $aaaa );
$self->aaaa_to_ptr( $aaaa ) if 1 == 0; # TODO: add option to enable
return $self->zr_generic( 28, $r, $rdata );
};
The TODO denotes a feature whereby removing the conditional would automatically create a PTR for every AAAA record.
This would be a security problem in cases where NicTool is used in a multi-tenant situation, but for single entities that use NicTool it would work just fine.