[Nagiosplug-devel] [ nagiosplug-Bugs-1478287 ] check_dns fails with CNAMEs
SourceForge.net
noreply at sourceforge.net
Fri Apr 28 02:44:08 CEST 2006
Bugs item #1478287, was opened at 2006-04-28 09:43
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1478287&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: James (jfidell)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_dns fails with CNAMEs
Initial Comment:
check_dns gives an error if the hostname being checked
is a CNAME instead of an A record:
DNS CRITICAL - '/usr/bin/nslookup -sil' msg parsing
exited with no address
This patch may be sub-optimal, but corrects the problem
for me:
--- check_dns.c~ Fri Apr 28 10:35:45 2006
+++ check_dns.c Fri Apr 28 10:35:52 2006
@@ -136,6 +136,13 @@
non_authoritative = TRUE;
}
+ else if ( strstr ( chld_out.line[i], query_address
) && !address ) {
+ if (( temp_buffer = strstr ( chld_out.line[i] +
strlen ( query_address ),
+ _("canonical name = ")))) {
+ address = strdup ( temp_buffer );
+ }
+ }
+
result = error_scan (chld_out.line[i]);
if (result != STATE_OK) {
msg = strchr (chld_out.line[i], ':');
James
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1478287&group_id=29880
More information about the Devel
mailing list