Changeset 639


Ignore:
Timestamp:
06/03/14 17:52:24 (10 years ago)
Author:
Kris Deugau
Message:

/trunk

Add a little more checking to AXFR imports; warn but do not discard
on bare IP addresses (or things-that-look-like-IP-addresses) for NS,
CNAME, and SRV records.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r637 r639  
    51485148        next if ($args{rwns} && ($host eq $zone));
    51495149        $val = $rr->nsdname;
     5150        $warnmsg .= "Suspect record '".$rr->string."' may not be imported correctly: NS records may not be bare IP addresses\n"
     5151          if $val =~ /^(?:(?:\d+\.){3}\d+|[a-fA-F0-9:]+)$/;
    51505152        $nsflag = 1;
    51515153      } elsif ($type eq 'CNAME') {
    51525154        $val = $rr->cname;
     5155        $warnmsg .= "Suspect record '".$rr->string."' may not be imported correctly: CNAME records may not be bare IP addresses\n"
     5156          if $val =~ /^(?:(?:\d+\.){3}\d+|[a-fA-F0-9:]+)$/;
    51535157      } elsif ($type eq 'SOA') {
    51545158        next if $args{rwsoa};
     
    51815185        $weight = $rr->weight;
    51825186        $port = $rr->port;
     5187        $warnmsg .= "Suspect record '".$rr->string."' may not be imported correctly: SRV records may not be bare IP addresses\n"
     5188          if $val =~ /^(?:(?:\d+\.){3}\d+|[a-fA-F0-9:]+)$/;
    51835189      } elsif ($type eq 'KEY') {
    51845190        # we don't actually know what to do with these...
Note: See TracChangeset for help on using the changeset viewer.