- Timestamp:
- 02/17/26 14:02:32 (15 hours ago)
- File:
-
- 1 edited
-
branches/cname-collision/DNSDB.pm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cname-collision/DNSDB.pm
r1038 r1039 626 626 627 627 my %args = @_; 628 #my ($hcheck,$rectype,$zid,$defrec,$revrec) = @_;629 628 630 629 my $hcheck = ($args{revrec} eq 'y' ? ${$args{val}} : ${$args{host}}); 631 630 my $hfield = ($args{revrec} eq 'y' ? 'val' : 'host'); 632 #my $hcheck = $hname;633 631 634 632 # $hcheck should be normalized by the time this sub is called. Convert to the formal .arpa name for error reporting in reverse zones. … … 640 638 } 641 639 642 # my $ret = 'OK';643 # my $msg = 'OK';644 645 640 # The record type comparison is the only difference between two passes through this chunk of code. 646 641 # CNAME records require both passes, where other records only need the second one. Downside is … … 649 644 next if $tcompare eq '<>' && ${$args{rectype}} != 5; 650 645 651 # Merging these sets of SQL statements is far too messy and doesn't reasonably652 # allow for more fine-grained error/warning messages to be returned646 # Merging these sets of SQL statements is far too messy and doesn't reasonably 647 # allow for more fine-grained error/warning messages to be returned 653 648 654 649 # First lookup fails out collisions with records without timestamps or default records (which can not have timestamps) … … 840 835 return ('FAIL',"A record must be a valid IPv4 address") 841 836 unless $args{addr} && !$args{addr}->{isv6}; 842 843 837 # coerce IP/value to normalized form for storage 844 838 ${$args{val}} = $args{addr}->addr; … … 966 960 # Enforce this for the zone name 967 961 return ('FAIL', "The bare zone name may not be a CNAME") if ${$args{host}} eq $pname || ${$args{host}} =~ /^\@/; 968 969 # # Check for hostnames matching new name970 # my @t = $dbh->selectrow_array("SELECT count(*) FROM records WHERE domain_id = ? AND type <> ? AND host = ?",971 # undef, $args{id}, 5, ${$args{host}});972 # return ('FAIL', "One or more existing records already use ${$args{host}}. CNAME records cannot use the same name as other records.")973 # if $t[0] > 0;974 962 975 963 return ('FAIL', $errstr) if ! _check_hostname_form(${$args{val}}, ${$args{rectype}}, $args{defrec}, $args{revrec}); … … 1778 1766 return ('FAIL',"Delegation records are not permitted in default record sets"); 1779 1767 } 1780 1781 1768 return ('OK','OK'); 1782 1769 } # done delegation record … … 2387 2374 $cfg->{force_refresh} = $1 if /^force_refresh\s*=\s*([a-z01]+)/i; 2388 2375 $cfg->{lowercase} = $1 if /^lowercase\s*=\s*([a-z01]+)/i; 2389 $cfg->{coerce_cname_timestamp} = $1 if /^coerce_cname_timestamp\s*=\s*(full|adjust|none)\s*$/i;2390 2376 $cfg->{showrev_arpa} = $1 if /^showrev_arpa\s*=\s*([a-z]+)/i; 2391 2377 $cfg->{coerce_cname_timestamp} = $1 if /^coerce_cname_timestamp\s*=\s*([a-z]+)/i;
Note:
See TracChangeset
for help on using the changeset viewer.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)