-
-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
Missing code for SRV import
elsif ( $first eq 'S' ) { # SRV
push @err, $self->zr_srv($record);
}
Fixed srv import function (not sure why it borked)
sub zr_srv {
my $self = shift;
my $r = shift or die;
print "SRV : $r\n";
my ($fqdn, $addr, $port, $priority, $weight, $ttl, $timestamp, $location) = split ':', $r;
my ($zone_id, $host) = $self->get_zone_id( $fqdn );
$self->nt_create_record(
zone_id => $zone_id,
type => 'SRV',
name => $host,
address => $self->fully_qualify( $addr ),
weight => $weight,
priority => $priority,
other => $port,
defined $ttl ? ( ttl => $ttl ) : (),
defined $timestamp ? ( timestamp => $timestamp ) : (),
defined $location ? ( location => $location ) : (),
);
}
MX function also had a small issue (no variable IP, $addr was sufficient, caused distance to be address when importing)
sub zr_mx {
my $self = shift;
my $r = shift or die;
print "MX : $r\n";
my ( $fqdn, $addr, $distance, $ttl, $timestamp, $location ) = split(':', $r);
my ($zone_id, $host) = $self->get_zone_id( $fqdn );
$self->nt_create_record(
zone_id => $zone_id,
type => 'MX',
name => $host,
address => $self->fully_qualify( $addr ),
weight => $distance || 0,
defined $ttl ? ( ttl => $ttl ) : (),
defined $timestamp ? ( timestamp => $timestamp ) : (),
defined $location ? ( location => $location ) : (),
);
}
Metadata
Metadata
Assignees
Labels
No labels