|
|
@@ -46,6 +46,7 @@ int show_help = FALSE;
|
|
|
int show_license = FALSE;
|
|
|
int show_version = FALSE;
|
|
|
int packet_ver = NRPE_PACKET_VERSION_3;
|
|
|
+int force_v2_packet = 0;
|
|
|
int payload_size = 0;
|
|
|
|
|
|
#ifdef HAVE_SSL
|
|
|
@@ -149,7 +150,7 @@ int main(int argc, char **argv)
|
|
|
|
|
|
if (result == -1) {
|
|
|
/* Failure reading from remote, so try version 2 packet */
|
|
|
- syslog(LOG_NOTICE, "Remote %s does not support Version 3 Packets", rem_host);
|
|
|
+ syslog(LOG_INFO, "Remote %s does not support Version 3 Packets", rem_host);
|
|
|
packet_ver = NRPE_PACKET_VERSION_2;
|
|
|
|
|
|
/* Rerun the setup */
|
|
|
@@ -168,8 +169,12 @@ int main(int argc, char **argv)
|
|
|
result = read_response(); /* Get the response */
|
|
|
}
|
|
|
|
|
|
- if (result != -1)
|
|
|
- syslog(LOG_NOTICE, "Remote %s accepted a Version %d Packet", rem_host, packet_ver);
|
|
|
+ if (result != -1) {
|
|
|
+ if (force_v2_packet = 0 && packet_ver == NRPE_PACKET_VERSION_2)
|
|
|
+ syslog(LOG_INFO, "Remote %s accepted a Version %d Packet", rem_host, packet_ver);
|
|
|
+ else
|
|
|
+ syslog(LOG_DEBUG, "Remote %s accepted a Version %d Packet", rem_host, packet_ver);
|
|
|
+ }
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
@@ -336,6 +341,7 @@ int process_arguments(int argc, char **argv, int from_config_file)
|
|
|
break;
|
|
|
}
|
|
|
packet_ver = NRPE_PACKET_VERSION_2;
|
|
|
+ force_v2_packet = 1;
|
|
|
break;
|
|
|
|
|
|
case '4':
|