From ff3938f24166df868d60e692f26a5840d7510983230899eb1a99dc3f21db90e0 Mon Sep 17 00:00:00 2001 From: Lars Vogdt Date: Mon, 15 Apr 2019 14:14:00 +0000 Subject: [PATCH] Accepting request 692599 from home:dstoecker - 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 --- check_ping_fix_ip4.patch | 15 +++++++++++++++ monitoring-plugins.changes | 5 +++++ monitoring-plugins.spec | 3 +++ 3 files changed, 23 insertions(+) create mode 100644 check_ping_fix_ip4.patch diff --git a/check_ping_fix_ip4.patch b/check_ping_fix_ip4.patch new file mode 100644 index 0000000..37f0efd --- /dev/null +++ b/check_ping_fix_ip4.patch @@ -0,0 +1,15 @@ +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); diff --git a/monitoring-plugins.changes b/monitoring-plugins.changes index 4bfa5f2..a2b59db 100644 --- a/monitoring-plugins.changes +++ b/monitoring-plugins.changes @@ -10,6 +10,11 @@ Fri Apr 12 14:20:08 CEST 2019 - ro@suse.de - update usr.lib.nagios.plugins.check_procs to bash in /usr +------------------------------------------------------------------- +Tue Apr 9 12:19:20 UTC 2019 - Dirk Stoecker + +- support IPv4 ping for dual stacked host again: check_ping_fix_ip4.patch + ------------------------------------------------------------------- Fri Nov 30 14:25:19 CET 2018 - ro@suse.de diff --git a/monitoring-plugins.spec b/monitoring-plugins.spec index df07da1..e16885a 100644 --- a/monitoring-plugins.spec +++ b/monitoring-plugins.spec @@ -62,6 +62,8 @@ Source59: nrpe-check_mysql Source60: nrpe-check_ups # PATCH-FIX-UPSTREAM Quote the options comming in from users (path names might contain whitespaces) Patch1: %{name}-2.1.1-check_logfile.patch +# PATCH-FIX-UPSTREAM Allow to ping IPv4 with check_ping again for dual stack hosts: https://github.com/monitoring-plugins/monitoring-plugins/issues/1550 +Patch2: check_ping_fix_ip4.patch # PATCH-FIX-OPENSUSE do not use chown in Makefile (not possible when building as normal user) Patch6: %{name}-1.4.6-no_chown.patch # PATCH-FIX-UPSTREAM Use correct pointer @@ -1102,6 +1104,7 @@ EOF done %patch1 -p1 +%patch2 -p1 %patch6 -p1 %patch11 -p1 %patch15 -p1