Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed deprecated set-ptr and autocreate_reverse_records #209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions config/config-sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 0 additions & 16 deletions model/zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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)) {
Expand Down Expand Up @@ -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()) {
Expand Down