Index: /branches/cname-collision/DNSDB.pm
===================================================================
--- /branches/cname-collision/DNSDB.pm	(revision 1017)
+++ /branches/cname-collision/DNSDB.pm	(revision 1018)
@@ -729,8 +729,16 @@
         } else {
           if ($self->{coerce_cname_timestamp} eq 'adjust') {
-            # coerce the valid-after timestamp
-            ${$args{stamp}} = strftime('%Y-%m-%d %H:%M:%S', localtime($t[0]));
-            return ('WARN', $typemap{${$args{rectype}}}." ".($args{update} ? 'updated' : 'added').
+            if ($t[2] == 1) {
+              # found a valid-after, but it's in the past, so adding an expiring record to match doesn't make
+              # sense since it's effectively expired.
+##fixme:  should probably remove this case once we get around to stripping valid-after timestamps once exported as active
+              return ('FAIL', "Cannot ".($args{update} ? 'update' : 'add')." ".$typemap{${$args{rectype}}}.
+		", an existing valid-after record is already active for this name");
+            } else {
+              # coerce the expiry timestamp
+              ${$args{stamp}} = strftime('%Y-%m-%d %H:%M:%S', localtime($t[0]));
+              return ('WARN', $typemap{${$args{rectype}}}." ".($args{update} ? 'updated' : 'added').
 		" with modified valid-after time;  conflicting expiring record found");
+            }
           } else {
             # New valid-after overlaps existing expiry, and not configured to adjust it
