Changeset 586
- Timestamp:
- 01/17/14 10:34:43 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r585 r586 648 648 # TXT record 649 649 sub _validate_16 { 650 my $self = shift; 651 652 my %args = @_; 653 654 if ($args{revrec} eq 'y') { 655 # Coerce all hostnames to end in ".DOMAIN" for group/default records, 656 # or the intended parent domain for live records. 657 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 658 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/; 659 } 660 650 661 # Could arguably put a WARN return here on very long (>512) records 651 662 return ('OK','OK'); … … 694 705 ${$args{dist}} =~ s/\s*//g; 695 706 return ('FAIL',"Distance is required, and must be numeric") unless ${$args{dist}} =~ /^\d+$/; 707 708 # Coerce all hostnames to end in ".DOMAIN" for group/default records, 709 # or the intended parent domain for live records. 710 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id})); 711 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/; 696 712 697 713 return ('FAIL',"SRV records must begin with _service._protocol [${$args{host}}]") … … 707 723 ${$args{fields}} = "distance,weight,port,"; 708 724 push @{$args{vallist}}, (${$args{dist}}, ${$args{weight}}, ${$args{port}}); 709 710 # Coerce all hostnames to end in ".DOMAIN" for group/default records,711 # or the intended parent domain for live records.712 my $pname = ($args{defrec} eq 'y' ? 'DOMAIN' : $self->domainName($args{id}));713 ${$args{host}} =~ s/\.*$/\.$pname/ if ${$args{host}} !~ /$pname$/;714 725 715 726 return ('OK','OK');
Note:
See TracChangeset
for help on using the changeset viewer.