Page 1 of 1

bug in passive host check handling

Posted: Mon Aug 26, 2019 2:08 pm
by eponymousalias
In Nagios 4.4.4 base/commands.c, we have the following code fragments:

Code: Select all

   2358 int process_passive_service_check(time_t check_time, char *host_name, char *svc_description, int return_code, char *output) {
   2359         check_result cr;
   2360         host *temp_host = NULL;
   2361         service *temp_service = NULL;
   2362         struct timeval tv;
   2363 
   2364         /* skip this service check result if we aren't accepting passive service checks */
   2365         if(accept_passive_service_checks == FALSE)
   2366                 return ERROR;

   2470 int process_passive_host_check(time_t check_time, char *host_name, int return_code, char *output) {
   2471         check_result cr;
   2472         host *temp_host = NULL;
   2473         struct timeval tv;
   2474 
   2475         /* skip this host check result if we aren't accepting passive host checks */
   2476         if(accept_passive_service_checks == FALSE)
   2477                 return ERROR;
Clearly, in that second fragment, accept_passive_service_checks should be accept_passive_host_checks instead.

And to answer your presumptive question, this is as far as I'm going to take this bug report.

Re: bug in passive host check handling

Posted: Mon Aug 26, 2019 2:40 pm
by mbellerue
Very awesome! Thank you for pointing this out! We'll get it handled.