[monitoring-plugins] Remove options if fping version is too low and ...
Lorenz Kästle
git at monitoring-plugins.org
Thu Jun 12 13:50:11 CEST 2025
Module: monitoring-plugins
Branch: master
Commit: a669b2531d3b01aeb5b3e39c28bf2e6816fb14af
Author: Lorenz Kästle <lorenz.kaestle at netways.de>
Date: Thu Jun 12 13:33:50 2025 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=a669b253
Remove options if fping version is too low and die directly
---
plugins/check_fping.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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) {
{"use-ipv6", no_argument, 0, '6'},
{"dontfrag", no_argument, 0, 'M'},
{"random", no_argument, 0, 'R'},
- // only available with fping version >= 5.3
+#ifdef FPING_VERSION_5_2_OR_HIGHER
+ // only available with fping version >= 5.2
{"fwmark", required_argument, NULL, FWMARK_OPT},
+# ifdef FPING_VERSION_5_3_OR_HIGHER
// only available with fping version >= 5.3
{"icmp-timestamp", no_argument, NULL, ICMP_TIMESTAMP_OPT},
{"check-source", no_argument, NULL, CHECK_SOURCE_OPT},
+# endif
+#endif
{0, 0, 0, 0}};
char *rv[2];
More information about the Commits
mailing list