Unverified Commit beae6dd4 authored by Gavin Brown's avatar Gavin Brown
Browse files

option to expect a particular RCODE

parent ee802bf6
...@@ -275,8 +275,8 @@ sub time_query { ...@@ -275,8 +275,8 @@ sub time_query {
debug($@); debug($@);
} }
if (!$result) { if (!$result || (defined($CONF->{'ResponseCode'}) && $result->header->rcode ne $CONF->{'ResponseCode'})) {
return undef; return undef;
} else { } else {
return $dt; return $dt;
...@@ -324,6 +324,7 @@ sub load_config { ...@@ -324,6 +324,7 @@ sub load_config {
$CONF->{'Timeout'} = $ini->param('Timeout') || 1; $CONF->{'Timeout'} = $ini->param('Timeout') || 1;
$CONF->{'Recurse'} = $ini->param('Recurse') eq 'true' || undef; $CONF->{'Recurse'} = $ini->param('Recurse') eq 'true' || undef;
$CONF->{'Question'} = $ini->param('Question') || '. A IN'; $CONF->{'Question'} = $ini->param('Question') || '. A IN';
$CONF->{'ResponseCode'} = $ini->param('ResponseCode') || undef;
$CONF->{'Servers'} = $ini->param('Servers') || undef; $CONF->{'Servers'} = $ini->param('Servers') || undef;
$CONF->{'Domains'} = $ini->param('Domains') || undef; $CONF->{'Domains'} = $ini->param('Domains') || undef;
$CONF->{'StatsFile'} = $ini->param('StatsFile') || undef; $CONF->{'StatsFile'} = $ini->param('StatsFile') || undef;
...@@ -911,6 +912,14 @@ Default: C<example.com. IN A> ...@@ -911,6 +912,14 @@ Default: C<example.com. IN A>
Specify the DNS question. The format is "QNAME QCLASS QTYPE". Specify the DNS question. The format is "QNAME QCLASS QTYPE".
=head2 C<ResponseCode RCODE>
Default: none
Specify the expected RCODE. If the RCODE does not match the server is
assumed to be down. If no value is specified, any RCODE will be
accepted.
=head2 C<Servers SERVERS> =head2 C<Servers SERVERS>
Default: none Default: none
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment