Changeset 1038
- Timestamp:
- 02/17/26 12:07:55 (14 hours ago)
- Location:
- branches/cname-collision
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cname-collision
- Property svn:mergeinfo changed
/trunk merged: 1002,1007,1035-1036
- Property svn:mergeinfo changed
-
branches/cname-collision/DNSDB.pm
r1019 r1038 949 949 unless ${$args{val}} =~ /^(?:\.|\*\.|rpz-passthru\.|rpz-drop\.|rpz-tcp-only\.)$/; 950 950 # 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); 952 952 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/i; 953 953 } else { … … 5007 5007 } 5008 5008 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 5009 5020 # Set up database fields and bind parameters 5010 5021 $fields .= "host,type,val,ttl,"._recparent($defrec,$revrec); … … 5198 5209 $retcode = 'WARN'; 5199 5210 } 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; 5200 5222 5201 5223 # Set up database fields and bind parameters. Note only the optional fields … … 7040 7062 $$recflags{$ip}++; 7041 7063 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 7042 7065 my $rec = $hpat; # start fresh with the template for each IP 7043 7066 ##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.
![[ DNS Administrator ]](/fx/dnsadmin-logo.png)