Changeset 1003 for branches/cname-collision
- Timestamp:
- 01/28/26 12:52:41 (16 hours ago)
- File:
-
- 1 edited
-
branches/cname-collision/DNSDB.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cname-collision/DNSDB.pm
r1000 r1003 723 723 if (@t) { 724 724 # caller requested an expiry time 725 my $reqstamp = str2time(${$args{stamp}}); 725 726 if (${$args{expires}} eq 'f') { 726 # valid-after can't be used together with expires-at on one record, so we can't 727 # coerce the new record to expire as well as keeping valid-after 728 if ($tcompare eq '<>') { 729 return ('FAIL', "Cannot ".($args{update} ? 'update' : 'add')." CNAME, another record". 727 if ($reqstamp > $t[0]) { 728 # do nothing, new record goes valid after the expiring record we found 729 } else { 730 if ($self->{coerce_cname_timestamp} eq 'adjust') { 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'). 734 " with modified valid-after time; conflicting expiring record found"); 735 } else { 736 # New valid-after overlaps existing expiry, and not configured to adjust it 737 my $fill = ($tcompare eq '<>' ? ' CNAME, another record' : $typemap{${$args{rectype}}}.', a CNAME'); 738 return ('FAIL', "Cannot ".($args{update} ? 'update' : 'add').$fill. 730 739 " with a valid-after time already exists for this name"); 731 } else { 732 return ('FAIL', "Cannot ".($args{update} ? 'update' : 'add')." ".$typemap{${$args{rectype}}}. 733 ", a CNAME with a valid-after time already exists for this name"); 734 } 740 } 741 } # else ($reqstamp < $t[0]) 735 742 } else { 736 my $reqstamp = str2time(${$args{stamp}});737 743 if ($reqstamp < $t[0]) { 738 744 # do nothing, new record will expire before the one we found
Note:
See TracChangeset
for help on using the changeset viewer.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)