Changeset 605


Ignore:
Timestamp:
04/02/14 15:57:27 (10 years ago)
Author:
Kris Deugau
Message:

/trunk

Make sure we only disassociate records from a zone if the old type was
one of the pseudotypes. Otherwise we can't update an existing PTR in
a forward zone, or A or AAAA in a reverse zone.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r603 r605  
    40484048  # need to forcibly make sure we disassociate a record with a parent it's no longer related to.
    40494049  # eg, PTR records may not have a domain parent, or A/AAAA records may not have a revzone parent.
    4050   # mainly needed for crossover types that got coerced down to "standard" types
    4051   if ($defrec eq 'n') {
     4050  # needed for crossover types that got coerced down to "standard" types due to data changes
     4051  # need to *avoid* funky records being updated like A/AAAA records in revzones, or PTRs in forward zones.
     4052  if ($defrec eq 'n' && $oldrec->{type} > 65000) {
    40524053    if ($$rectype == $reverse_typemap{PTR}) {
    40534054      $fields .= ",domain_id";
     
    40604061  }
    40614062  # fix fat-finger-originated record type changes
    4062   if ($$rectype == 65285) {
     4063  if ($$rectype == 65285) {  # delegation
    40634064    $fields .= ",rdns_id" if $revrec eq 'n';
    40644065    $fields .= ",domain_id" if $revrec eq 'y';
    40654066    push @vallist, 0;
    40664067  }
     4068  # ... and now make sure we *do* associate a record with the "calling" parent
    40674069  if ($defrec eq 'n') {
    40684070    $domid = $parid if $revrec eq 'n';
Note: See TracChangeset for help on using the changeset viewer.