Ignore:
Timestamp:
02/17/26 12:07:55 (13 hours ago)
Author:
Kris Deugau
Message:

/branches/cname-collision

Merge a couple of last-minute trailing commits from /trunk

Location:
branches/cname-collision
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cname-collision

  • branches/cname-collision/DNSDB.pm

    r1019 r1038  
    949949        unless ${$args{val}} =~ /^(?:\.|\*\.|rpz-passthru\.|rpz-drop\.|rpz-tcp-only\.)$/;
    950950      # Append the RPZ name
    951       my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id}));
     951      my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $zname);
    952952      ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/i;
    953953    } else {
     
    50075007  }
    50085008
     5009  # Minor cleanup of invalid DNS labels
     5010##fixme: seems like map should be used here to be decently Perlish, but any time I stick
     5011# a s/// inside the block map only returns the match/replace count instead of whatever
     5012# the changed $_ is for some reason
     5013  my @hbits = split /\./, $$host;
     5014  foreach (@hbits) {
     5015    s/^-+//;
     5016    s/-+$//;
     5017  }
     5018  $$host = join '.', @hbits;
     5019
    50095020  # Set up database fields and bind parameters
    50105021  $fields .= "host,type,val,ttl,"._recparent($defrec,$revrec);
     
    51985209    $retcode = 'WARN';
    51995210  }
     5211
     5212  # Minor cleanup of invalid DNS labels
     5213##fixme: seems like map should be used here to be decently Perlish, but any time I stick
     5214# a s/// inside the block map only returns the match/replace count instead of whatever
     5215# the changed $_ is for some reason
     5216  my @hbits = split /\./, $$host;
     5217  foreach (@hbits) {
     5218    s/^-+//;
     5219    s/-+$//;
     5220  }
     5221  $$host = join '.', @hbits;
    52005222
    52015223  # Set up database fields and bind parameters.  Note only the optional fields
     
    70407062      $$recflags{$ip}++;
    70417063      next if $hpat eq '%blank%';       # Allows blanking a subnet so no records are published.
     7064      next if $hpat =~ /^\%blank\%/;    # Safety net in case of oopses elsewhere
    70427065      my $rec = $hpat;  # start fresh with the template for each IP
    70437066##fixme:  there really isn't a good way to handle sub-/24 zones here.  This way at least
Note: See TracChangeset for help on using the changeset viewer.