Changeset 939 for branches


Ignore:
Timestamp:
12/11/25 16:34:27 (23 hours ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Logic bug checking the CNAME record count
Fix up call to collision sub so it might actually run
See #72

File:
1 edited

Legend:

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

    r938 r939  
    651651        " WHERE "._recparent($args{defrec}, $args{revrec})." = ? AND type = 5 AND $hfield = ?",
    652652        undef, $args{id}, $hcheck);
    653   if ($t[0] > 1) {
     653  if ($t[0] > 0) {
    654654    $errstr = "There is already a CNAME present for ".($args{revrec} eq 'y' ? $arpaname : $hcheck).
    655655        ".  Only one CNAME may be present for a given name.";
     
    876876      return ('FAIL', $errstr) if ! _check_hostname_form(${$args{val}}, ${$args{rectype}}, $args{defrec}, $args{revrec});
    877877
    878 my ($code,$msg) = self->_cname_collision(%args);
     878      return ('FAIL', $errstr) unless $self->_cname_collision(%args);
    879879
    880880    } # $zname !~ .rpz
Note: See TracChangeset for help on using the changeset viewer.