summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenz Kästle <lorenz.kaestle@netways.de>2025-06-12 13:33:50 +0200
committerLorenz Kästle <lorenz.kaestle@netways.de>2025-06-12 13:33:50 +0200
commita669b2531d3b01aeb5b3e39c28bf2e6816fb14af (patch)
treee2b5a0c853b64074e8734dbe3b5de5b2c45fc8ed
parent19f409ac559278cd8623e2d5875818938f648996 (diff)
downloadmonitoring-plugins-a669b2531d3b01aeb5b3e39c28bf2e6816fb14af.tar.gz
Remove options if fping version is too low and die directly
-rw-r--r--plugins/check_fping.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/check_fping.c b/plugins/check_fping.c
index 5db6b9aa..8018e06d 100644
--- a/plugins/check_fping.c
+++ b/plugins/check_fping.c
@@ -315,11 +315,15 @@ check_fping_config_wrapper process_arguments(int argc, char **argv) {
315 {"use-ipv6", no_argument, 0, '6'}, 315 {"use-ipv6", no_argument, 0, '6'},
316 {"dontfrag", no_argument, 0, 'M'}, 316 {"dontfrag", no_argument, 0, 'M'},
317 {"random", no_argument, 0, 'R'}, 317 {"random", no_argument, 0, 'R'},
318 // only available with fping version >= 5.3 318#ifdef FPING_VERSION_5_2_OR_HIGHER
319 // only available with fping version >= 5.2
319 {"fwmark", required_argument, NULL, FWMARK_OPT}, 320 {"fwmark", required_argument, NULL, FWMARK_OPT},
321# ifdef FPING_VERSION_5_3_OR_HIGHER
320 // only available with fping version >= 5.3 322 // only available with fping version >= 5.3
321 {"icmp-timestamp", no_argument, NULL, ICMP_TIMESTAMP_OPT}, 323 {"icmp-timestamp", no_argument, NULL, ICMP_TIMESTAMP_OPT},
322 {"check-source", no_argument, NULL, CHECK_SOURCE_OPT}, 324 {"check-source", no_argument, NULL, CHECK_SOURCE_OPT},
325# endif
326#endif
323 {0, 0, 0, 0}}; 327 {0, 0, 0, 0}};
324 328
325 char *rv[2]; 329 char *rv[2];