- Timestamp:
- 09/12/14 18:04:03 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r658 r660 517 517 # Fail on "compact" IPv4 variants, because they are not consistent and predictable. 518 518 return ('FAIL',"A record must be a valid IPv4 address") 519 unless ${$args{host}} =~ /^\d+\.\d+\.\d+\.\d+$/;519 unless ${$args{host}} =~ m{^\d+\.\d+\.\d+\.\d+(/\d+)?$}; 520 520 $args{addr} = new NetAddr::IP ${$args{host}}; 521 521 return ('FAIL',"A record must be a valid IPv4 address") … … 1044 1044 # but that gets stupid in forward zones, since these records are shared. 1045 1045 return ('FAIL', "$typemap{${$args{rectype}}} record must be a valid IPv4 address") 1046 if ${$args{rectype}} == 65280 && ${$args{val}} !~ /^\d+\.\d+\.\d+\.\d+$/;1046 if ${$args{rectype}} == 65280 && ${$args{val}} !~ m{^\d+\.\d+\.\d+\.\d+(?:/\d+)?$}; 1047 1047 return ('FAIL', "$typemap{${$args{rectype}}} record must be a valid IPv6 address") 1048 if ${$args{rectype}} == 65281 && ${$args{val}} !~ /^[a-fA-F0-9:]+$/;1048 if ${$args{rectype}} == 65281 && ${$args{val}} !~ m{^[a-fA-F0-9:]+(?:/\d+)?$}; 1049 1049 # If things are not OK, this should prevent Stupid in the error log. 1050 1050 $args{addr} = new NetAddr::IP ${$args{val}} … … 4020 4020 foreach my $sf (split /,/, $args{sortby}) { 4021 4021 $sf = "r.$sf"; 4022 $sf =~ s/r\.val/inetlazy(r.val)/ 4023 if $args{revrec} eq 'y' && $args{defrec} eq 'n'; 4022 $sf =~ s/r\.val/inetlazy(r.val)/; 4023 # hmm. do we really need to limit this? 4024 # if $args{revrec} eq 'y' && $args{defrec} eq 'n'; 4024 4025 $sf =~ s/r\.type/t.alphaorder/; 4025 4026 $newsort .= ",$sf";
Note:
See TracChangeset
for help on using the changeset viewer.