forked from pool/monitoring-plugins
ff3938f241
- support IPv4 ping for dual stacked host again: check_ping_fix_ip4.patch OBS-URL: https://build.opensuse.org/request/show/692599 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins?expand=0&rev=62
16 lines
535 B
Diff
16 lines
535 B
Diff
diff -ur monitoring-plugins-2.2/plugins/check_ping.c monitoring-plugins-2.2_fix/plugins/check_ping.c
|
|
--- monitoring-plugins-2.2/plugins/check_ping.c 2016-11-29 09:45:08.000000000 +0100
|
|
+++ monitoring-plugins-2.2_fix/plugins/check_ping.c 2019-04-09 14:09:57.574380368 +0200
|
|
@@ -128,6 +128,11 @@
|
|
#else
|
|
xasprintf (&cmd, rawcmd, addresses[i], max_packets);
|
|
#endif
|
|
+ if (address_family == AF_INET) {
|
|
+ free(rawcmd);
|
|
+ rawcmd = cmd;
|
|
+ xasprintf (&cmd, "%s -4", rawcmd);
|
|
+ }
|
|
|
|
if (verbose >= 2)
|
|
printf ("CMD: %s\n", cmd);
|