Changeset 1019


Ignore:
Timestamp:
02/05/26 12:41:29 (5 days ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Relocate changes from r1018 to correct subbranch.

See #72

File:
1 edited

Legend:

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

    r1018 r1019  
    729729        } else {
    730730          if ($self->{coerce_cname_timestamp} eq 'adjust') {
    731             if ($t[2] == 1) {
    732               # found a valid-after, but it's in the past, so adding an expiring record to match doesn't make
    733               # sense since it's effectively expired.
    734 ##fixme:  should probably remove this case once we get around to stripping valid-after timestamps once exported as active
    735               return ('FAIL', "Cannot ".($args{update} ? 'update' : 'add')." ".$typemap{${$args{rectype}}}.
    736                 ", an existing valid-after record is already active for this name");
    737             } else {
    738               # coerce the expiry timestamp
    739               ${$args{stamp}} = strftime('%Y-%m-%d %H:%M:%S', localtime($t[0]));
    740               return ('WARN', $typemap{${$args{rectype}}}." ".($args{update} ? 'updated' : 'added').
     731            # coerce the valid-after timestamp
     732            ${$args{stamp}} = strftime('%Y-%m-%d %H:%M:%S', localtime($t[0]));
     733            return ('WARN', $typemap{${$args{rectype}}}." ".($args{update} ? 'updated' : 'added').
    741734                " with modified valid-after time;  conflicting expiring record found");
    742             }
    743735          } else {
    744736            # New valid-after overlaps existing expiry, and not configured to adjust it
     
    753745        } else {
    754746          if ($self->{coerce_cname_timestamp} eq 'adjust') {
    755             # coerce the expiry timestamp
    756             ${$args{stamp}} = strftime('%Y-%m-%d %H:%M:%S', localtime($t[0]));
    757             return ('WARN', $typemap{${$args{rectype}}}." ".($args{update} ? 'updated' : 'added').
     747            if ($t[2] == 1) {
     748              # found a valid-after, but it's in the past, so adding an expiring record to match doesn't make
     749              # sense since it's effectively expired.
     750##fixme:  should probably remove this case once we get around to stripping valid-after timestamps once exported as active
     751              return ('FAIL', "Cannot ".($args{update} ? 'update' : 'add')." ".$typemap{${$args{rectype}}}.
     752                ", an existing valid-after record is already active for this name");
     753            } else {
     754              # coerce the expiry timestamp
     755              ${$args{stamp}} = strftime('%Y-%m-%d %H:%M:%S', localtime($t[0]));
     756              return ('WARN', $typemap{${$args{rectype}}}." ".($args{update} ? 'updated' : 'added').
    758757                " with modified expiry time;  conflicting valid-after record found");
     758            }
    759759          } else {
    760760            return ('FAIL', "Cannot ".($args{update} ? 'update' : 'add')." ".$typemap{${$args{rectype}}}.
Note: See TracChangeset for help on using the changeset viewer.