Changeset 828


Ignore:
Timestamp:
11/18/21 18:15:01 (3 years ago)
Author:
Kris Deugau
Message:

/trunk

Partial fix for A+PTR publication glitch from forward zones, ideally needs
revision for all octet boundaries. See #76.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r827 r828  
    65756575    my $stamp = shift;
    65766576    my $loc = shift;
    6577     my $zone = new NetAddr::IP shift;
     6577    my $zone = shift;
     6578    # error/sanity check - if $zone is not an IP address, make sure we're just
     6579    # converting a string that looks like an IP into a NetAddr::IP, instead of
     6580    # doing a DNS lookup that is virtually guaranteed to be wrong.  still a
     6581    # little hazy where this functionality in NetAddr::IP is useful.
     6582    # instead, fall back to the octet-boundary CIDR derived from $sub.
     6583    if ($zone !~ m,^\d+\.\d+\.\d+\.\d+/\d+$,) {
     6584      $zone = $sub;
     6585      $zone =~ s,\d+/\d+$,0/24,;   ##fixme:  case of larger than /24?
     6586      # could apply another sanity check here?  as above anything much larger
     6587      # than a /16 is WAY too time-consuming to publish in one go
     6588    }
     6589    $zone = new NetAddr::IP $zone;
    65786590    my $ptronly = shift || 0;
    65796591
Note: See TracChangeset for help on using the changeset viewer.