Compare commits
2 Commits
07dc0d75c5
...
401db7bda8
Author | SHA1 | Date | |
---|---|---|---|
401db7bda8 | |||
dc1a90014a |
@ -35,10 +35,10 @@ my %supported_types = (
|
|||||||
AAAA => "yes",
|
AAAA => "yes",
|
||||||
CAA => "not yet implemented",
|
CAA => "not yet implemented",
|
||||||
CNAME => "yes",
|
CNAME => "yes",
|
||||||
DNAME => "not yet implemented",
|
DNAME => "yes",
|
||||||
MX => "yes",
|
MX => "yes",
|
||||||
NS => "yes",
|
NS => "yes",
|
||||||
PTR => "not yet implemented",
|
PTR => "yes",
|
||||||
SSHFP => "not yet implemented",
|
SSHFP => "not yet implemented",
|
||||||
SRV => "yes",
|
SRV => "yes",
|
||||||
TLSA => "not yet implemented",
|
TLSA => "not yet implemented",
|
||||||
@ -120,6 +120,13 @@ sub format_record($$$$) {
|
|||||||
my ($pri, $data) = split(/\s+/, $value);
|
my ($pri, $data) = split(/\s+/, $value);
|
||||||
$record->{mx_priority} = $pri;
|
$record->{mx_priority} = $pri;
|
||||||
$record->{data} = $data;
|
$record->{data} = $data;
|
||||||
|
} elsif ($type eq 'SRV') {
|
||||||
|
# pri weight port data
|
||||||
|
my ($pri, $weight, $port, $data) = split(/\s+/, $value);
|
||||||
|
$record->{srv_priority} = $pri;
|
||||||
|
$record->{srv_weight} = $weight;
|
||||||
|
$record->{srv_port} = $port;
|
||||||
|
$record->{data} = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $record;
|
return $record;
|
||||||
@ -129,6 +136,13 @@ sub reformat_data($$) {
|
|||||||
my ($type, $data) = @_;
|
my ($type, $data) = @_;
|
||||||
if($type eq 'MX') {
|
if($type eq 'MX') {
|
||||||
return sprintf('%d %s', $data->{mx_priority}, $data->{data});
|
return sprintf('%d %s', $data->{mx_priority}, $data->{data});
|
||||||
|
} elsif($type eq 'SRV') {
|
||||||
|
return sprintf('%d %d %d %s',
|
||||||
|
$data->{srv_priority},
|
||||||
|
$data->{srv_weight},
|
||||||
|
$data->{srv_port},
|
||||||
|
$data->{data}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data->{data};
|
return $data->{data};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user