Ignore:
Timestamp:
02/17/26 14:02:32 (13 hours ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Clean up some miscellanea found preparing to merge this branch back to /trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cname-collision/DNSDB.pm

    r1038 r1039  
    626626
    627627  my %args = @_;
    628 #my ($hcheck,$rectype,$zid,$defrec,$revrec) = @_;
    629628
    630629  my $hcheck = ($args{revrec} eq 'y' ? ${$args{val}} : ${$args{host}});
    631630  my $hfield = ($args{revrec} eq 'y' ? 'val' : 'host');
    632 #my $hcheck = $hname;
    633631
    634632  # $hcheck should be normalized by the time this sub is called.  Convert to the formal .arpa name for error reporting in reverse zones.
     
    640638  }
    641639
    642 #  my $ret = 'OK';
    643 #  my $msg = 'OK';
    644 
    645640  # The record type comparison is the only difference between two passes through this chunk of code.
    646641  # CNAME records require both passes, where other records only need the second one.  Downside is
     
    649644    next if $tcompare eq '<>' && ${$args{rectype}} != 5;
    650645
    651 # Merging these sets of SQL statements is far too messy and doesn't reasonably
    652 # allow for more fine-grained error/warning messages to be returned
     646    # 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
    653648
    654649    # First lookup fails out collisions with records without timestamps or default records (which can not have timestamps)
     
    840835    return ('FAIL',"A record must be a valid IPv4 address")
    841836        unless $args{addr} && !$args{addr}->{isv6};
    842 
    843837    # coerce IP/value to normalized form for storage
    844838    ${$args{val}} = $args{addr}->addr;
     
    966960      # Enforce this for the zone name
    967961      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 name
    970 #      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;
    974962
    975963      return ('FAIL', $errstr) if ! _check_hostname_form(${$args{val}}, ${$args{rectype}}, $args{defrec}, $args{revrec});
     
    17781766    return ('FAIL',"Delegation records are not permitted in default record sets");
    17791767  }
    1780 
    17811768  return ('OK','OK');
    17821769} # done delegation record
     
    23872374      $cfg->{force_refresh}     = $1 if /^force_refresh\s*=\s*([a-z01]+)/i;
    23882375      $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;
    23902376      $cfg->{showrev_arpa}      = $1 if /^showrev_arpa\s*=\s*([a-z]+)/i;
    23912377      $cfg->{coerce_cname_timestamp}    = $1 if /^coerce_cname_timestamp\s*=\s*([a-z]+)/i;
Note: See TracChangeset for help on using the changeset viewer.