Changeset 834 for trunk/DNSDB.pm


Ignore:
Timestamp:
04/19/22 16:34:34 (2 years ago)
Author:
Kris Deugau
Message:

/trunk

Accumulated tinkering on compact-recs.pl, part 1

  • Switch module-finding blob to latest theoretically-good form. See #80.
  • Fix broken handling of "n'th natural IP" on compaction, possibly also on export
  • Trim some development comments
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r833 r834  
    17981798  my $tmpl = shift;
    17991799  my $ip = shift;
    1800   my $subnet = shift;   # for %ngb and %c
     1800  my $subnet = shift;   # %ngb, %c, and %x
    18011801  my $ipindex = shift;  # for %c
    18021802
     
    18421842
    18431843    if ($cn) {
    1844       # "natural n'th IP in the block" pattern
    1845       $$tmpl =~ s/$cn/$ipindex+1/e;
     1844      # "n'th natural IP in the block" pattern.
     1845      my $iptmp = new NetAddr::IP $ip;
     1846      my $natdex = scalar($iptmp - $$subnet);
     1847      $natdex++;
     1848      $$tmpl =~ s/$cn/$natdex/;
    18461849    }
    18471850
Note: See TracChangeset for help on using the changeset viewer.