Changeset 202


Ignore:
Timestamp:
12/15/11 17:18:17 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Fix bug in SOA handling; Vega stores "contact:primary-ns" in the
host field, not "primary-ns:contact"... so we do too until we come
up with a completely different and better way to handle SOA records.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r201 r202  
    12291229
    12301230  my ($recid,$host,$val,$ttl,$serial) = $sth->fetchrow_array() or return;
    1231   my ($prins,$contact) = split /:/, $host;
     1231  my ($contact,$prins) = split /:/, $host;
    12321232  my ($refresh,$retry,$expire,$minttl) = split /:/, $val;
    12331233
     
    19321932        # val is abused to contain refresh:retry:expire:minttl
    19331933##fixme:  "manual" serial vs tinydns-autoserial
    1934         print $datafile "Z$host"."::$val:$ttl:$stamp:$loc\n";
     1934        # let's be explicit about abusing $host and $val
     1935        my ($email, $primary) = (split /:/, $host)[0,1];
     1936        my ($refresh, $retry, $expire, $min_ttl) = (split /:/, $val)[0,1,2,3];
     1937        print $datafile "Z$dom:$primary:$email"."::$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n";
    19351938
    19361939      } elsif ($typemap{$type} eq 'A') {
  • trunk/dns.cgi

    r201 r202  
    744744        " SET host=?, val=?, ttl=? WHERE record_id=?";
    745745  $sth = $dbh->prepare($sql);
    746   $sth->execute("$webvar{prins}:$webvar{contact}",
     746  $sth->execute("$webvar{contact}:$webvar{prins}",
    747747        "$webvar{refresh}:$webvar{retry}:$webvar{expire}:$webvar{minttl}",
    748748        $webvar{ttl},
Note: See TracChangeset for help on using the changeset viewer.