- Timestamp:
- 07/24/13 12:25:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r529 r531 438 438 # or the intended parent domain for live records. 439 439 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 440 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/;440 ${$args{host}} =~ s/\.*$/\.$pname/ if (${$args{host}} ne '@' && ${$args{host}} !~ /$pname$/); 441 441 442 442 # Check IP is well-formed, and that it's a v4 address … … 3675 3675 return ('FAIL', "Hostnames may not contain anything other than (0-9 a-z . _)") 3676 3676 if $defrec eq 'n' && ($revrec eq 'y' ? $$rectype != $reverse_typemap{TXT} : 1) && 3677 $$host !~ /^ [0-9a-z_%.-]+$/i;3677 $$host !~ /^(?:[0-9a-z_%.-]+|@)$/i; 3678 3678 3679 3679 # Collect these even if we're only doing a simple A record so we can call *any* validation sub … … 3812 3812 return ('FAIL', "Hostnames may not contain anything other than (0-9 a-z - . _)") 3813 3813 if $defrec eq 'n' && ($revrec eq 'y' ? $$rectype != $reverse_typemap{TXT} : 1) && 3814 $$host !~ /^ [0-9a-z_%.-]+$/i;3814 $$host !~ /^(?:[0-9a-z_%.-]+|@)$/i; 3815 3815 3816 3816 # only MX and SRV will use these … … 5093 5093 my ($datafile,$revrec,$recflags,$zone,$host,$type,$val,$dist,$weight,$port,$ttl,$loc,$stamp) = @_; 5094 5094 5095 if ($revrec eq 'y') { 5096 $val = $zone if $val eq '@'; 5097 } else { 5098 $host = $zone if $host eq '@'; 5099 } 5100 5095 5101 ## Convert a bare number into an octal-coded pair of octets. 5096 5102 # Take optional arg to indicate a decimal or hex input. Defaults to hex.
Note:
See TracChangeset
for help on using the changeset viewer.