Skip to content

Commit

Permalink
Update DNS SOA record parameters to use primary_ns instead of domain.
Browse files Browse the repository at this point in the history
  • Loading branch information
nsouto committed Feb 5, 2024
1 parent 865c5dd commit 90e07df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pdns/var/lib/powerdns/bin/default.pl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


my ($type,$qname,$qclass,$qtype,$id,$ip,$localip,$ednsip)=split(/\t/);
my $domain = `/var/lib/powerdns/bin/powerdns domain:root $qname`;
# my $domain = `/var/lib/powerdns/bin/powerdns domain:root $qname`;
my $bits=21;
my $auth = 1;

Expand All @@ -53,10 +53,10 @@
if (exists $ENV{"PIPE_DEFAULT_NS"}) {
my @ns_records = split(',', $ENV{"PIPE_DEFAULT_NS"});
# print "DATA $bits $auth $qname $qclass SOA 3600 -1 $primary_ns hostmaster.$domain 2008080300 1800 3600 604800 3600\n";
print "DATA\t$bits\t$auth\t$qname\t$qclass\tSOA\t3600\t-1\t$primary_ns\thostmaster.$domain\t2008080300\t1800\t3600\t604800\t3600\n";
print "DATA\t$bits\t$auth\t$qname\t$qclass\tSOA\t3600\t-1\t$primary_ns\thostmaster.$primary_ns\t2008080300\t1800\t3600\t604800\t3600\n";
} else {
# print "DATA $bits $auth $qname $qclass SOA 3600 -1 ns1.localhost hostmaster.$domain 2008080300 1800 3600 604800 3600\n";
print "DATA\t$bits\t$auth\t$qname\t$qclass\tSOA\t3600\t-1\tns1.localhost\thostmaster.$domain\t2008080300\t1800\t3600\t604800\t3600\n";
print "DATA\t$bits\t$auth\t$qname\t$qclass\tSOA\t3600\t-1\tns1.localhost\thostmaster.$primary_ns\t2008080300\t1800\t3600\t604800\t3600\n";
}
}

Expand Down

0 comments on commit 90e07df

Please sign in to comment.