$Lang::tr{'domain'} | $dhcpinfo{'domain_name'} |
$Lang::tr{'gateway'} | $dhcpinfo{'routers'} |
$Lang::tr{'primary dns'} | $DNS1 |
$Lang::tr{'secondary dns'} | $DNS2 |
$Lang::tr{'dhcp server'} | $dhcpinfo{'dhcp_server_identifier'} |
$Lang::tr{'def lease time'} | $leasetime |
$Lang::tr{'default renewal time'} | $rnwltime |
$Lang::tr{'max renewal time'} | $maxtime |
END
;
}else{
print "$Lang::tr{'no dhcp lease'}";
}
&Header::closebox();
}
&Header::closebigbox();
&Header::closepage();
}
sub check_dnssec($$) {
my $nameserver = shift;
my $record = shift;
my @command = ("dig", "+dnssec", $record, "\@$nameserver");
my @output = qx(@command);
my $output = join("", @output);
my $status = 0;
if ($output =~ m/status: (\w+)/) {
$status = ($1 eq "NOERROR");
if (!$status) {
return -1;
}
}
my @flags = ();
if ($output =~ m/flags: (.*);/) {
@flags = split(/ /, $1);
}
my $aware = ($output =~ m/RRSIG/);
my $validating = ("ad" ~~ @flags);
return $aware + $validating;
}