Changeset 828
- Timestamp:
- 11/18/21 18:15:01 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r827 r828 6575 6575 my $stamp = shift; 6576 6576 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; 6578 6590 my $ptronly = shift || 0; 6579 6591
Note:
See TracChangeset
for help on using the changeset viewer.