ports/156988: net-mgmt/nagios: Please add IPv6 support
Helmut Schneider
jumper99 at gmx.de
Fri May 20 16:00:28 UTC 2011
The following reply was made to PR ports/156988; it has been noted by GNATS.
From: "Helmut Schneider" <jumper99 at gmx.de>
To: "Jarrod Sayers" <jarrod at downtools.com.au>,
<bug-followup at FreeBSD.org>
Cc: <matt at conundrum.com>
Subject: Re: ports/156988: net-mgmt/nagios: Please add IPv6 support
Date: Fri, 20 May 2011 17:58:20 +0200
Dies ist eine mehrteilige Nachricht im MIME-Format.
------=_NextPart_000_00C9_01CC1717.812983D0
Content-Type: text/plain;
format=flowed;
charset="iso-8859-1";
reply-type=original
Content-Transfer-Encoding: 7bit
From: "Jarrod Sayers" <jarrod at downtools.com.au>
> Requests of this nature should be directed towards the development team.
> If an official patch is released by this team that delivers the required
> feature,
> I would be more than happy to support its addition.
While I changed the patch to the attached version which works fine with
3.2.3 on 8.2-RELEASE I also asked the nagios-devel mailing list about the
current status. I'll keep you posted.
Helmut
------=_NextPart_000_00C9_01CC1717.812983D0
Content-Type: application/octet-stream;
name="patch-ipv6.in"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="patch-ipv6.in"
--- base/commands.c.org 2008-11-30 19:22:58.000000000 +0200=0A=
+++ base/commands.c 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -2060,9 +2060,12 @@=0A=
real_host_name=3Dtemp_host->name;=0A=
break;=0A=
}=0A=
- }=0A=
+ else if(!strcmp(host_name,temp_host->address6)){=0A=
+ real_host_name=3Dtemp_host->name;=0A=
+ break;=0A=
+ }=0A=
}=0A=
-=0A=
+ }=0A=
/* we couldn't find the host */=0A=
if(real_host_name=3D=3DNULL){=0A=
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);=0A=
@@ -2201,9 +2204,12 @@=0A=
real_host_name=3Dtemp_host->name;=0A=
break;=0A=
}=0A=
- }=0A=
+ else if(!strcmp(host_name,temp_host->address6)){=0A=
+ real_host_name=3Dtemp_host->name;=0A=
+ break;=0A=
+ }=0A=
}=0A=
-=0A=
+ }=0A=
/* we couldn't find the host */=0A=
if(temp_host=3D=3DNULL){=0A=
logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: Passive check result was =
received for host '%s', but the host could not be found!\n",host_name);=0A=
--- cgi/config.c.org 2010-09-01 17:19:59.000000000 +0300=0A=
+++ cgi/config.c 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -473,6 +473,7 @@=0A=
printf("<TH CLASS=3D'data'>Host Name</TH>");=0A=
printf("<TH CLASS=3D'data'>Alias/Description</TH>");=0A=
printf("<TH CLASS=3D'data'>Address</TH>");=0A=
+ printf("<TH CLASS=3D'data'>Address6</TH>");=0A=
printf("<TH CLASS=3D'data'>Parent Hosts</TH>");=0A=
printf("<TH CLASS=3D'data'>Max. Check Attempts</TH>");=0A=
printf("<TH CLASS=3D'data'>Check Interval</TH>\n");=0A=
@@ -532,6 +533,7 @@=0A=
=
url_encode(temp_host->name),CONFIG_CGI,url_encode(temp_host->name),html_e=
ncode(temp_host->name,FALSE));=0A=
printf("<TD =
CLASS=3D'%s'>%s</TD>\n",bg_class,html_encode(temp_host->alias,FALSE));=0A=
printf("<TD =
CLASS=3D'%s'>%s</TD>\n",bg_class,html_encode(temp_host->address,FALSE));=0A=
+ printf("<TD =
CLASS=3D'%s'>%s</TD>\n",bg_class,html_encode(temp_host->address6,FALSE));=0A=
=0A=
printf("<TD CLASS=3D'%s'>",bg_class);=0A=
=
for(temp_hostsmember=3Dtemp_host->parent_hosts;temp_hostsmember!=3DNULL;t=
emp_hostsmember=3Dtemp_hostsmember->next){=0A=
--- cgi/extinfo.c.org 2010-06-18 17:25:30.000000000 +0300=0A=
+++ cgi/extinfo.c 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -244,6 +244,9 @@=0A=
printf("function nagios_get_host_address()\n{\n");=0A=
printf("return \"%s\";\n",temp_host->address);=0A=
printf("}\n");=0A=
+ printf("function nagios_get_host_address6()\n{\n");=0A=
+ printf("return \"%s\";\n",temp_host->address6);=0A=
+ printf("}\n");=0A=
if(temp_service!=3DNULL){=0A=
printf("function nagios_get_service_description()\n{\n");=0A=
printf("return \"%s\";\n",temp_service->description);=0A=
@@ -348,7 +351,7 @@=0A=
if(found=3D=3DFALSE)=0A=
printf("No hostgroups");=0A=
printf("</DIV><BR>\n");=0A=
- printf("<DIV CLASS=3D'data'>%s</DIV>\n",temp_host->address);=0A=
+ printf("<DIV CLASS=3D'data'>%s, =
%s</DIV>\n",temp_host->address,temp_host->address6);=0A=
}=0A=
if(display_type=3D=3DDISPLAY_SERVICE_INFO){=0A=
printf("<DIV CLASS=3D'data'>Service</DIV><DIV =
CLASS=3D'dataTitle'>%s</DIV><DIV CLASS=3D'data'>On =
Host</DIV>\n",service_desc);=0A=
@@ -368,7 +371,7 @@=0A=
printf("No servicegroups.");=0A=
printf("</DIV><BR>\n");=0A=
=0A=
- printf("<DIV CLASS=3D'data'>%s</DIV>\n",temp_host->address);=0A=
+ printf("<DIV CLASS=3D'data'>%s, =
%s</DIV>\n",temp_host->address,temp_host->address6);=0A=
}=0A=
if(display_type=3D=3DDISPLAY_HOSTGROUP_INFO){=0A=
printf("<DIV CLASS=3D'data'>Hostgroup</DIV>\n");=0A=
--- cgi/status.c.org 2010-09-21 18:05:31.000000000 +0300=0A=
+++ cgi/status.c 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -271,6 +271,11 @@=0A=
host_name=3Dstrdup(temp_host->name);=0A=
break;=0A=
}=0A=
+ if(!strcmp(host_name,temp_host->address6)){=0A=
+ free(host_name);=0A=
+ host_name=3Dstrdup(temp_host->name);=0A=
+ break;=0A=
+ }=0A=
}=0A=
if(temp_host=3D=3DNULL){=0A=
=
for(temp_host=3Dhost_list;temp_host!=3DNULL;temp_host=3Dtemp_host->next){=0A=
--- cgi/statusmap.c 2009-07-08 01:19:45.000000000 +0300=0A=
+++ cgi/statusmap.c 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -1951,6 +1951,7 @@=0A=
printf("<tr><td class=3D\\\"popupText\\\">Name:</td><td =
class=3D\\\"popupText\\\"><b>%s</b></td></tr>",escape_string(hst->name));=0A=
printf("<tr><td class=3D\\\"popupText\\\">Alias:</td><td =
class=3D\\\"popupText\\\"><b>%s</b></td></tr>",escape_string(hst->alias))=
;=0A=
printf("<tr><td class=3D\\\"popupText\\\">Address:</td><td =
class=3D\\\"popupText\\\"><b>%s</b></td></tr>",html_encode(hst->address,T=
RUE));=0A=
+ printf("<tr><td class=3D\\\"popupText\\\">Address6:</td><td =
class=3D\\\"popupText\\\"><b>%s</b></td></tr>",html_encode(hst->address6,=
TRUE));=0A=
printf("<tr><td class=3D\\\"popupText\\\">State:</td><td =
class=3D\\\"popupText\\\"><b>");=0A=
=0A=
/* get the status of the host (pending, up, down, or unreachable) */=0A=
--- cgi/statuswml.c.org 2009-06-19 07:30:26.000000000 +0300=0A=
+++ cgi/statuswml.c 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -952,7 +952,9 @@=0A=
printf("<b>Host Commands</b><br/>\n");=0A=
=0A=
printf("<b><anchor title=3D'Ping Host'>Ping Host<go href=3D'%s' =
method=3D'post'><postfield name=3D'ping' =
value=3D'%s'/></go></anchor></b>\n",STATUSWML_CGI,temp_host->address);=0A=
+ printf("<b><anchor title=3D'Ping6 Host'>Ping6 Host<go href=3D'%s' =
method=3D'post'><postfield name=3D'ping6' =
value=3D'%s'/></go></anchor></b>\n",STATUSWML_CGI,temp_host->address6);=0A=
printf("<b><anchor title=3D'Traceroute'>Traceroute<go href=3D'%s' =
method=3D'post'><postfield name=3D'traceroute' =
value=3D'%s'/></go></anchor></b>\n",STATUSWML_CGI,temp_host->address);=0A=
+ printf("<b><anchor title=3D'Traceroute6'>Traceroute6<go href=3D'%s' =
method=3D'post'><postfield name=3D'traceroute6' =
value=3D'%s'/></go></anchor></b>\n",STATUSWML_CGI,temp_host->address6);=0A=
=0A=
if(temp_hoststatus->status!=3DHOST_UP && =
temp_hoststatus->status!=3DHOST_PENDING)=0A=
printf("<b><anchor title=3D'Acknowledge Problem'>Acknowledge =
Problem<go href=3D'#card3'/></anchor></b>\n");=0A=
--- common/macros.c.org 2010-09-21 18:05:31.000000000 +0300=0A=
+++ common/macros.c 2010-12-15 18:04:56.000000000 +0200=0A=
@@ -696,6 +696,7 @@=0A=
case MACRO_HOSTNAME:=0A=
case MACRO_HOSTALIAS:=0A=
case MACRO_HOSTADDRESS:=0A=
+ case MACRO_HOSTADDRESS6:=0A=
case MACRO_LASTHOSTCHECK:=0A=
case MACRO_LASTHOSTSTATECHANGE:=0A=
case MACRO_HOSTOUTPUT:=0A=
@@ -1626,6 +1627,9 @@=0A=
case MACRO_HOSTADDRESS:=0A=
*output=3D(char *)strdup(temp_host->address);=0A=
break;=0A=
+ case MACRO_HOSTADDRESS6:=0A=
+ *output=3D(char *)strdup(temp_host->address6);=0A=
+ break;=0A=
#ifdef NSCORE=0A=
case MACRO_HOSTSTATE:=0A=
if(temp_host->current_state=3D=3DHOST_DOWN)=0A=
@@ -2573,6 +2577,7 @@=0A=
add_macrox_name(MACRO_HOSTNAME,"HOSTNAME");=0A=
add_macrox_name(MACRO_HOSTALIAS,"HOSTALIAS");=0A=
add_macrox_name(MACRO_HOSTADDRESS,"HOSTADDRESS");=0A=
+ add_macrox_name(MACRO_HOSTADDRESS6,"HOSTADDRESS6");=0A=
add_macrox_name(MACRO_SERVICEDESC,"SERVICEDESC");=0A=
add_macrox_name(MACRO_SERVICESTATE,"SERVICESTATE");=0A=
add_macrox_name(MACRO_SERVICESTATEID,"SERVICESTATEID");=0A=
@@ -2929,6 +2934,7 @@=0A=
case MACRO_HOSTDISPLAYNAME:=0A=
case MACRO_HOSTALIAS:=0A=
case MACRO_HOSTADDRESS:=0A=
+ case MACRO_HOSTADDRESS6:=0A=
case MACRO_HOSTSTATE:=0A=
case MACRO_HOSTSTATEID:=0A=
case MACRO_HOSTCHECKTYPE:=0A=
--- common/objects.c.org 2010-09-21 18:05:31.000000000 +0300=0A=
+++ common/objects.c 2010-12-15 17:38:38.000000000 +0200=0A=
@@ -621,7 +621,7 @@=0A=
=0A=
=0A=
/* add a new host definition */=0A=
-host *add_host(char *name, char *display_name, char *alias, char =
*address, char *check_period, int initial_state, double check_interval, =
double retry_interval, int max_attempts, int notify_up, int notify_down, =
int notify_unreachable, int notify_flapping, int notify_downtime, double =
notification_interval, double first_notification_delay, char =
*notification_period, int notifications_enabled, char *check_command, =
int checks_enabled, int accept_passive_checks, char *event_handler, int =
event_handler_enabled, int flap_detection_enabled, double =
low_flap_threshold, double high_flap_threshold, int =
flap_detection_on_up, int flap_detection_on_down, int =
flap_detection_on_unreachable, int stalk_on_up, int stalk_on_down, int =
stalk_on_unreachable, int process_perfdata, int =
failure_prediction_enabled, char *failure_prediction_options, int =
check_freshness, int freshness_threshold, char *notes, char *notes_url, =
char *action_url, char *icon_image, char *icon_image_alt, char =
*vrml_image, char *statusmap_image, int x_2d, int y_2d, int =
have_2d_coords, double x_3d, double y_3d, double z_3d, int =
have_3d_coords, int should_be_drawn, int retain_status_information, int =
retain_nonstatus_information, int obsess_over_host){=0A=
+host *add_host(char *name, char *display_name, char *alias, char =
*address, char *address6, char *check_period, int initial_state, double =
check_interval, double retry_interval, int max_attempts, int notify_up, =
int notify_down, int notify_unreachable, int notify_flapping, int =
notify_downtime, double notification_interval, double =
first_notification_delay, char *notification_period, int =
notifications_enabled, char *check_command, int checks_enabled, int =
accept_passive_checks, char *event_handler, int event_handler_enabled, =
int flap_detection_enabled, double low_flap_threshold, double =
high_flap_threshold, int flap_detection_on_up, int =
flap_detection_on_down, int flap_detection_on_unreachable, int =
stalk_on_up, int stalk_on_down, int stalk_on_unreachable, int =
process_perfdata, int failure_prediction_enabled, char =
*failure_prediction_options, int check_freshness, int =
freshness_threshold, char *notes, char *notes_url, char *action_url, =
char *icon_image, char *icon_image_alt, char *vrml_image, char =
*statusmap_image, int x_2d, int y_2d, int have_2d_coords, double x_3d, =
double y_3d, double z_3d, int have_3d_coords, int should_be_drawn, int =
retain_status_information, int retain_nonstatus_information, int =
obsess_over_host){=0A=
host *new_host=3DNULL;=0A=
int result=3DOK;=0A=
#ifdef NSCORE=0A=
@@ -676,6 +676,7 @@=0A=
new_host->name=3DNULL;=0A=
new_host->alias=3DNULL;=0A=
new_host->address=3DNULL;=0A=
+ new_host->address6=3DNULL;=0A=
new_host->check_period=3DNULL;=0A=
new_host->notification_period=3DNULL;=0A=
new_host->host_check_command=3DNULL;=0A=
@@ -719,6 +720,8 @@=0A=
result=3DERROR;=0A=
if((new_host->address=3D(char *)strdup(address))=3D=3DNULL)=0A=
result=3DERROR;=0A=
+ if((new_host->address6=3D(char *)strdup(address6))=3D=3DNULL)=0A=
+ result=3DERROR;=0A=
if(check_period){=0A=
if((new_host->check_period=3D(char *)strdup(check_period))=3D=3DNULL)=0A=
result=3DERROR;=0A=
@@ -901,6 +904,7 @@=0A=
my_free(new_host->notification_period);=0A=
my_free(new_host->check_period);=0A=
my_free(new_host->address);=0A=
+ my_free(new_host->address6);=0A=
my_free(new_host->alias);=0A=
my_free(new_host->display_name);=0A=
my_free(new_host->name);=0A=
@@ -3722,6 +3726,7 @@=0A=
my_free(this_host->display_name);=0A=
my_free(this_host->alias);=0A=
my_free(this_host->address);=0A=
+ my_free(this_host->address6);=0A=
#ifdef NSCORE=0A=
my_free(this_host->plugin_output);=0A=
my_free(this_host->long_plugin_output);=0A=
--- include/macros.h.org 2008-11-30 19:22:59.000000000 +0200=0A=
+++ include/macros.h 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -40,7 +40,7 @@=0A=
=0A=
#define MAX_USER_MACROS 256 /* maximum number of $USERx$ macros */=0A=
=0A=
-#define MACRO_X_COUNT 153 /* size of macro_x[] array */=0A=
+#define MACRO_X_COUNT 154 /* size of macro_x[] array */=0A=
=0A=
#define MACRO_HOSTNAME 0=0A=
#define MACRO_HOSTALIAS 1=0A=
@@ -195,6 +195,7 @@=0A=
#define MACRO_LASTHOSTSTATEID 150=0A=
#define MACRO_LASTSERVICESTATE 151=0A=
#define MACRO_LASTSERVICESTATEID 152=0A=
+#define MACRO_HOSTADDRESS6 153=0A=
=0A=
=0A=
=0A=
--- include/objects.h.org 2009-05-17 15:54:28.000000000 +0300=0A=
+++ include/objects.h 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -269,6 +269,7 @@=0A=
char *display_name;=0A=
char *alias;=0A=
char *address;=0A=
+ char *address6;=0A=
hostsmember *parent_hosts;=0A=
hostsmember *child_hosts;=0A=
servicesmember *services;=0A=
@@ -639,7 +640,7 @@=0A=
commandsmember *add_service_notification_command_to_contact(contact =
*,char *); /* adds a service notification command to a contact =
definition */=0A=
commandsmember *add_host_notification_command_to_contact(contact *,char =
*); /* adds a host notification command to a contact definition */=0A=
customvariablesmember *add_custom_variable_to_contact(contact *,char =
*,char *); /* adds a custom variable to a =
service definition */=0A=
-host *add_host(char *,char *,char *,char *,char =
*,int,double,double,int,int,int,int,int,int,double,double,char =
*,int,char *,int,int,char =
*,int,int,double,double,int,int,int,int,int,int,int,int,char =
*,int,int,char *,char *,char *,char *,char *,char *,char =
*,int,int,int,double,double,double,int,int,int,int,int); /* adds a host =
definition */=0A=
+host *add_host(char *,char *,char *,char *,char *,char =
*,int,double,double,int,int,int,int,int,int,double,double,char =
*,int,char *,int,int,char =
*,int,int,double,double,int,int,int,int,int,int,int,int,char =
*,int,int,char *,char *,char *,char *,char *,char *,char =
*,int,int,int,double,double,double,int,int,int,int,int); /* adds a host =
definition */=0A=
hostsmember *add_parent_host_to_host(host *,char *); /* adds a =
parent host to a host definition */=0A=
hostsmember *add_child_link_to_host(host *,host *); /* =
adds a child host to a host definition */=0A=
contactgroupsmember *add_contactgroup_to_host(host *,char *); =
/* adds a contactgroup to a host definition */=0A=
--- t/Makefile.org 1970-01-01 03:00:00.000000000 +0300=0A=
+++ t/Makefile 2010-12-13 09:42:30.000000000 +0200=0A=
@@ -0,0 +1,11 @@=0A=
+# Makefile for Nagios tests using perl=0A=
+=0A=
+all: =0A=
+=0A=
+test:=0A=
+ prove *.t=0A=
+=0A=
+clean:=0A=
+=0A=
+distclean:=0A=
+=0A=
--- t-tap/test_events.c.org 2010-09-21 19:43:14.000000000 +0300=0A=
+++ t-tap/test_events.c 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -231,6 +231,7 @@=0A=
host1=3D(host *)malloc(sizeof(host));=0A=
host1->name=3Dstrdup("Host1");=0A=
host1->address=3Dstrdup("127.0.0.1");=0A=
+ host1->address6=3Dstrdup("::1");=0A=
host1->retry_interval=3D1;=0A=
host1->check_interval=3D5;=0A=
host1->check_options=3D0;=0A=
--- xdata/xodtemplate.c.org 2010-03-29 17:51:38.000000000 +0300=0A=
+++ xdata/xodtemplate.c 2010-12-15 17:48:08.000000000 +0200=0A=
@@ -1492,6 +1492,7 @@=0A=
new_host->have_display_name=3DFALSE;=0A=
new_host->alias=3DNULL;=0A=
new_host->address=3DNULL;=0A=
+ new_host->address6=3DNULL;=0A=
new_host->parents=3DNULL;=0A=
new_host->have_parents=3DFALSE;=0A=
new_host->host_groups=3DNULL;=0A=
@@ -3366,6 +3367,10 @@=0A=
if((temp_host->address=3D(char *)strdup(value))=3D=3DNULL)=0A=
result=3DERROR;=0A=
}=0A=
+ else if(!strcmp(variable,"address6")){=0A=
+ if((temp_host->address6=3D(char *)strdup(value))=3D=3DNULL)=0A=
+ result=3DERROR;=0A=
+ }=0A=
else if(!strcmp(variable,"parents")){=0A=
if(strcmp(value,XODTEMPLATE_NULL)){=0A=
if((temp_host->parents=3D(char *)strdup(value))=3D=3DNULL)=0A=
@@ -7869,6 +7874,8 @@=0A=
this_host->alias=3D(char *)strdup(template_host->alias);=0A=
if(this_host->address=3D=3DNULL && template_host->address!=3DNULL)=0A=
this_host->address=3D(char *)strdup(template_host->address);=0A=
+ if(this_host->address6=3D=3DNULL && template_host->address6!=3DNULL)=0A=
+ this_host->address6=3D(char *)strdup(template_host->address6);=0A=
=0A=
=
xodtemplate_get_inherited_string(&template_host->have_parents,&template_h=
ost->parents,&this_host->have_parents,&this_host->parents);=0A=
=
xodtemplate_get_inherited_string(&template_host->have_host_groups,&templa=
te_host->host_groups,&this_host->have_host_groups,&this_host->host_groups=
);=0A=
@@ -10464,9 +10471,11 @@=0A=
this_host->alias=3D(char *)strdup(this_host->host_name);=0A=
if(this_host->address=3D=3DNULL && this_host->host_name!=3DNULL)=0A=
this_host->address=3D(char *)strdup(this_host->host_name);=0A=
+ if(this_host->address6=3D=3DNULL && this_host->host_name!=3DNULL)=0A=
+ this_host->address6=3D(char *)strdup(this_host->host_name);=0A=
=0A=
/* add the host definition */=0A=
- =
new_host=3Dadd_host(this_host->host_name,this_host->display_name,this_hos=
t->alias,(this_host->address=3D=3DNULL)?this_host->host_name:this_host->a=
ddress,this_host->check_period,this_host->initial_state,this_host->check_=
interval,this_host->retry_interval,this_host->max_check_attempts,this_hos=
t->notify_on_recovery,this_host->notify_on_down,this_host->notify_on_unre=
achable,this_host->notify_on_flapping,this_host->notify_on_downtime,this_=
host->notification_interval,this_host->first_notification_delay,this_host=
->notification_period,this_host->notifications_enabled,this_host->check_c=
ommand,this_host->active_checks_enabled,this_host->passive_checks_enabled=
,this_host->event_handler,this_host->event_handler_enabled,this_host->fla=
p_detection_enabled,this_host->low_flap_threshold,this_host->high_flap_th=
reshold,this_host->flap_detection_on_up,this_host->flap_detection_on_down=
,this_host->flap_detection_on_unreachable,this_host->stalk_on_up,this_hos=
t->stalk_on_down,this_host->stalk_on_unreachable,this_host->process_perf_=
data,this_host->failure_prediction_enabled,this_host->failure_prediction_=
options,this_host->check_freshness,this_host->freshness_threshold,this_ho=
st->notes,this_host->notes_url,this_host->action_url,this_host->icon_imag=
e,this_host->icon_image_alt,this_host->vrml_image,this_host->statusmap_im=
age,this_host->x_2d,this_host->y_2d,this_host->have_2d_coords,this_host->=
x_3d,this_host->y_3d,this_host->z_3d,this_host->have_3d_coords,TRUE,this_=
host->retain_status_information,this_host->retain_nonstatus_information,t=
his_host->obsess_over_host);=0A=
+ =
new_host=3Dadd_host(this_host->host_name,this_host->display_name,this_hos=
t->alias,(this_host->address=3D=3DNULL)?this_host->host_name:this_host->a=
ddress,(this_host->address6=3D=3DNULL)?this_host->host_name:this_host->ad=
dress6,this_host->check_period,this_host->initial_state,this_host->check_=
interval,this_host->retry_interval,this_host->max_check_attempts,this_hos=
t->notify_on_recovery,this_host->notify_on_down,this_host->notify_on_unre=
achable,this_host->notify_on_flapping,this_host->notify_on_downtime,this_=
host->notification_interval,this_host->first_notification_delay,this_host=
->notification_period,this_host->notifications_enabled,this_host->check_c=
ommand,this_host->active_checks_enabled,this_host->passive_checks_enabled=
,this_host->event_handler,this_host->event_handler_enabled,this_host->fla=
p_detection_enabled,this_host->low_flap_threshold,this_host->high_flap_th=
reshold,this_host->flap_detection_on_up,this_host->flap_detection_on_down=
,this_host->flap_detection_on_unreachable,this_host->stalk_on_up,this_hos=
t->stalk_on_down,this_host->stalk_on_unreachable,this_host->process_perf_=
data,this_host->failure_prediction_enabled,this_host->failure_prediction_=
options,this_host->check_freshness,this_host->freshness_threshold,this_ho=
st->notes,this_host->notes_url,this_host->action_url,this_host->icon_imag=
e,this_host->icon_image_alt,this_host->vrml_image,this_host->statusmap_im=
age,this_host->x_2d,this_host->y_2d,this_host->have_2d_coords,this_host->=
x_3d,this_host->y_3d,this_host->z_3d,this_host->have_3d_coords,TRUE,this_=
host->retain_status_information,this_host->retain_nonstatus_information,t=
his_host->obsess_over_host);=0A=
=0A=
=0A=
/* return with an error if we couldn't add the host */=0A=
@@ -11910,6 +11919,8 @@=0A=
fprintf(fp,"\talias\t%s\n",temp_host->alias);=0A=
if(temp_host->address)=0A=
fprintf(fp,"\taddress\t%s\n",temp_host->address);=0A=
+ if(temp_host->address6)=0A=
+ fprintf(fp,"\taddress6\t%s\n",temp_host->address6);=0A=
if(temp_host->parents)=0A=
fprintf(fp,"\tparents\t%s\n",temp_host->parents);=0A=
if(temp_host->check_period)=0A=
@@ -13113,6 +13124,7 @@=0A=
my_free(this_host->host_name);=0A=
my_free(this_host->alias);=0A=
my_free(this_host->address);=0A=
+ my_free(this_host->address6);=0A=
my_free(this_host->parents);=0A=
my_free(this_host->host_groups);=0A=
my_free(this_host->check_command);=0A=
--- xdata/xodtemplate.h.org 2009-05-20 02:41:48.000000000 +0300=0A=
+++ xdata/xodtemplate.h 2010-12-13 09:42:09.000000000 +0200=0A=
@@ -229,6 +229,7 @@=0A=
char *display_name;=0A=
char *alias;=0A=
char *address;=0A=
+ char *address6;=0A=
char *parents;=0A=
char *host_groups;=0A=
char *check_command;=0A=
------=_NextPart_000_00C9_01CC1717.812983D0--
More information about the freebsd-ports-bugs
mailing list