support different algos
This commit is contained in:
parent
b5c1232b78
commit
33e6bbbb84
@ -27,6 +27,7 @@ use Pod::Usage;
|
|||||||
my $port = 53;
|
my $port = 53;
|
||||||
my $ttl = 3600;
|
my $ttl = 3600;
|
||||||
my $help = 0;
|
my $help = 0;
|
||||||
|
my $tsigalgo = 'hmac-md5';
|
||||||
my ($tsigname, $tsigkey, $server, $verbose, $tsig);
|
my ($tsigname, $tsigkey, $server, $verbose, $tsig);
|
||||||
my ($old_rr, $new_rr, $update, $resolver, $reply, $ip);
|
my ($old_rr, $new_rr, $update, $resolver, $reply, $ip);
|
||||||
|
|
||||||
@ -36,7 +37,8 @@ GetOptions("help|?" => \$help,
|
|||||||
"server=s" => \$server,
|
"server=s" => \$server,
|
||||||
"ttl=i" => \$ttl,
|
"ttl=i" => \$ttl,
|
||||||
"tsigname=s" => \$tsigname,
|
"tsigname=s" => \$tsigname,
|
||||||
"tsigkey=s" => \$tsigkey)
|
"tsigkey=s" => \$tsigkey,
|
||||||
|
"tsigalgo=s" => \$tsigalgo)
|
||||||
or die("Error in command line arguments\n");
|
or die("Error in command line arguments\n");
|
||||||
|
|
||||||
pod2usage(1) if ($help or scalar(@ARGV) != 2);
|
pod2usage(1) if ($help or scalar(@ARGV) != 2);
|
||||||
@ -72,6 +74,7 @@ if (defined $old_rr && defined $new_rr) {
|
|||||||
|
|
||||||
if (defined $tsigname && defined $tsigkey) {
|
if (defined $tsigname && defined $tsigkey) {
|
||||||
$tsig = Net::DNS::RR::TSIG->create($tsigname, $tsigkey);
|
$tsig = Net::DNS::RR::TSIG->create($tsigname, $tsigkey);
|
||||||
|
$tsig->algorithm($tsigalgo);
|
||||||
say $tsig->string if ($verbose);
|
say $tsig->string if ($verbose);
|
||||||
$update->push( additional => $tsig);
|
$update->push( additional => $tsig);
|
||||||
}
|
}
|
||||||
@ -114,6 +117,7 @@ dnsupdate_tlsa [options] zone dnsname
|
|||||||
-port DNS port
|
-port DNS port
|
||||||
-tsigname Name of tsig key
|
-tsigname Name of tsig key
|
||||||
-tsigkey tsig key
|
-tsigkey tsig key
|
||||||
|
-tsigalgo tsig algorithm
|
||||||
|
|
||||||
=head1 OPTIONS
|
=head1 OPTIONS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user