diff -Naur nagios-HEAD-old/base/commands.c nagios-HEAD/base/commands.c
--- nagios-HEAD-old/base/commands.c 2010-10-23 13:00:46.000000000 +0300
+++ nagios-HEAD/base/commands.c 2010-12-09 04:10:35.000000000 +0200
@@ -2060,9 +2060,12 @@
real_host_name=temp_host->name;
break;
}
- }
+ else if(!strcmp(host_name,temp_host->address6)){
+ real_host_name=temp_host->name;
+ break;
+ }
}
-
+ }
/* we couldn't find the host */
if(real_host_name==NULL){
logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: Passive check result was received for service '%s' on host '%s', but the host could not be found!\n",svc_description,host_name);
@@ -2201,9 +2204,12 @@
real_host_name=temp_host->name;
break;
}
- }
+ else if(!strcmp(host_name,temp_host->address6)){
+ real_host_name=temp_host->name;
+ break;
+ }
}
-
+ }
/* we couldn't find the host */
if(temp_host==NULL){
logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: Passive check result was received for host '%s', but the host could not be found!\n",host_name);
diff -Naur nagios-HEAD-old/cgi/config.c nagios-HEAD/cgi/config.c
--- nagios-HEAD-old/cgi/config.c 2010-10-28 15:31:40.000000000 +0300
+++ nagios-HEAD/cgi/config.c 2010-12-09 04:04:04.000000000 +0200
@@ -477,6 +477,7 @@
printf("
Host Name | ");
printf("Alias/Description | ");
printf("Address | ");
+ printf("Address6 | ");
printf("Parent Hosts | ");
printf("Max. Check Attempts | ");
printf("Check Interval | \n");
@@ -536,6 +537,7 @@
url_encode(temp_host->name),CONFIG_CGI,url_encode(temp_host->name),html_encode(temp_host->name,FALSE));
printf("%s | \n",bg_class,html_encode(temp_host->alias,FALSE));
printf("%s | \n",bg_class,html_encode(temp_host->address,FALSE));
+ printf("%s | \n",bg_class,html_encode(temp_host->address6,FALSE));
printf("",bg_class);
for(temp_hostsmember=temp_host->parent_hosts;temp_hostsmember!=NULL;temp_hostsmember=temp_hostsmember->next){
diff -Naur nagios-HEAD-old/cgi/extinfo.c nagios-HEAD/cgi/extinfo.c
--- nagios-HEAD-old/cgi/extinfo.c 2010-11-05 01:42:18.000000000 +0200
+++ nagios-HEAD/cgi/extinfo.c 2010-12-09 04:02:18.000000000 +0200
@@ -247,6 +247,9 @@
printf("function nagios_get_host_address()\n{\n");
printf("return \"%s\";\n",temp_host->address);
printf("}\n");
+ printf("function nagios_get_host_address6()\n{\n");
+ printf("return \"%s\";\n",temp_host->address6);
+ printf("}\n");
if(temp_service!=NULL){
printf("function nagios_get_service_description()\n{\n");
printf("return \"%s\";\n",temp_service->description);
@@ -351,7 +354,7 @@
if(found==FALSE)
printf("No hostgroups");
printf(" \n");
- printf("%s \n",temp_host->address);
+ printf("%s, %s \n",temp_host->address,temp_host->address6);
}
if(display_type==DISPLAY_SERVICE_INFO){
printf("Service %s On Host \n",service_desc);
@@ -371,7 +374,7 @@
printf("No servicegroups.");
printf(" \n");
- printf("%s \n",temp_host->address);
+ printf("%s, %s \n",temp_host->address,temp_host->address6);
}
if(display_type==DISPLAY_HOSTGROUP_INFO){
printf("Hostgroup \n");
diff -Naur nagios-HEAD-old/cgi/status.c nagios-HEAD/cgi/status.c
--- nagios-HEAD-old/cgi/status.c 2010-10-28 15:31:40.000000000 +0300
+++ nagios-HEAD/cgi/status.c 2010-12-09 04:14:20.000000000 +0200
@@ -274,6 +274,11 @@
host_name=strdup(temp_host->name);
break;
}
+ if(!strcmp(host_name,temp_host->address6)){
+ free(host_name);
+ host_name=strdup(temp_host->name);
+ break;
+ }
}
if(temp_host==NULL){
for(temp_host=host_list;temp_host!=NULL;temp_host=temp_host->next){
diff -Naur nagios-HEAD-old/cgi/statusmap.c nagios-HEAD/cgi/statusmap.c
--- nagios-HEAD-old/cgi/statusmap.c 2010-10-28 15:31:40.000000000 +0300
+++ nagios-HEAD/cgi/statusmap.c 2010-12-09 04:02:55.000000000 +0200
@@ -1955,6 +1955,7 @@
printf(" |
",escape_string(hst->name));
printf("
",escape_string(hst->alias));
printf("
",html_encode(hst->address,TRUE));
+ printf("
",html_encode(hst->address6,TRUE));
printf("|