Changeset 350
- Timestamp:
- 06/26/12 13:48:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r349 r350 3141 3141 # of types. Other things may also be added to validate default records of several flavours. 3142 3142 return ('FAIL', "Hostnames may not contain anything other than (0-9 a-z . _)") 3143 if $defrec eq 'n' && $$host !~ /^[0-9a-z_%.-]+$/i; 3143 if $defrec eq 'n' && ($revrec eq 'y' ? $$rectype != $reverse_typemap{TXT} : 1) && 3144 $$host !~ /^[0-9a-z_%.-]+$/i; 3144 3145 3145 3146 # Collect these even if we're only doing a simple A record so we can call *any* validation sub … … 3256 3257 # of types. Other things may also be added to validate default records of several flavours. 3257 3258 return ('FAIL', "Hostnames may not contain anything other than (0-9 a-z - . _)") 3258 if $defrec eq 'n' && $$host !~ /^[0-9a-z_%.-]+$/i; 3259 if $defrec eq 'n' && ($revrec eq 'y' ? $$rectype != $reverse_typemap{TXT} : 1) && 3260 $$host !~ /^[0-9a-z_%.-]+$/i; 3259 3261 3260 3262 # only MX and SRV will use these … … 4408 4410 4409 4411 ##fixme: split v-e-r-y long TXT strings? will need to do so for BIND export, at least 4410 $val =~ s/:/\\072/g; # may need to replace other symbols 4411 print $datafile "'$host:$val:$ttl:$stamp:$loc\n"; 4412 if ($revrec eq 'n') { 4413 $val =~ s/:/\\072/g; # may need to replace other symbols 4414 print $datafile "'$host:$val:$ttl:$stamp:$loc\n"; 4415 } else { 4416 $host =~ s/:/\\072/g; # may need to replace other symbols 4417 my $val2 = NetAddr::IP->new($val); 4418 print $datafile "'"._ZONE($val2, 'ZONE', 'r', '.').($val2->{isv6} ? '.ip6.arpa' : '.in-addr.arpa'). 4419 ":$host:$ttl:$stamp:$loc\n"; 4420 } 4412 4421 4413 4422 # by-hand TXT
Note:
See TracChangeset
for help on using the changeset viewer.