From 8927f093deded58853919f5ba1b92ccf441ba2e5 Mon Sep 17 00:00:00 2001 From: Klaus Zerwes Date: Fri, 23 Feb 2024 03:29:06 +0100 Subject: [PATCH] removed deprecated set-ptr and autocreate_reverse_records --- config/config-sample.ini | 4 ---- model/zone.php | 16 ---------------- 2 files changed, 20 deletions(-) diff --git a/config/config-sample.ini b/config/config-sample.ini index ec9b5df..18ebd10 100644 --- a/config/config-sample.ini +++ b/config/config-sample.ini @@ -104,10 +104,6 @@ dnssec = 0 ; Allow enabling/disabling DNSSEC through the UI dnssec_edit = 1 -; If enabled (the default), matching PTR records will be automatically created -; when new A or AAAA records are added. -autocreate_reverse_records = 1 - ; Space-separated lists local_zone_suffixes = "localdomain" local_ipv4_ranges = "10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 127.0.0.0/8" diff --git a/model/zone.php b/model/zone.php index da23521..9e1f4ab 100644 --- a/model/zone.php +++ b/model/zone.php @@ -783,12 +783,6 @@ private function process_rrset_action($update, &$trash, &$revs_missing, &$revs_u } if(($update->type == 'SOA' || $update->type == 'NS') && !$active_user->admin) return; - if(isset($config['dns']['autocreate_reverse_records'])) { - $autocreate_ptr = (bool)$config['dns']['autocreate_reverse_records']; - } else { - $autocreate_ptr = true; # enabled by default - } - switch($update->action) { case 'add': if(!isset($update->records) || !is_array($update->records)) throw new BadData('Malformed action'); @@ -807,11 +801,6 @@ private function process_rrset_action($update, &$trash, &$revs_missing, &$revs_u $rr = new ResourceRecord; $rr->content = $record->content; $rr->disabled = ($record->enabled === 'No' || $record->enabled === false); - if(!$autocreate_ptr || $rr->disabled) { - $rr->{'set-ptr'} = false; - } else { - $rr->{'set-ptr'} = $zone_dir->check_reverse_record_zone($rrset->name, $rrset->type, $rr->content, $revs_missing, $revs_updated); - } $rrset->add_resource_record($rr); } if(isset($update->comment)) { @@ -846,11 +835,6 @@ private function process_rrset_action($update, &$trash, &$revs_missing, &$revs_u $rr = new ResourceRecord; $rr->content = $record->content; $rr->disabled = ($record->enabled === 'No' || $record->enabled === false); - if(!$autocreate_ptr || $rr->disabled) { - $rr->{'set-ptr'} = false; - } else { - $rr->{'set-ptr'} = $zone_dir->check_reverse_record_zone($rrset->name, $rrset->type, $rr->content, $revs_missing, $revs_updated); - } $rrset->add_resource_record($rr); } if(isset($update->comment) && $update->comment != $rrset->merge_comment_text()) {