Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package monitoring-plugins for openSUSE:Factory checked in at 2025-04-02 17:22:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/monitoring-plugins (Old) and /work/SRC/openSUSE:Factory/.monitoring-plugins.new.1907 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "monitoring-plugins" Wed Apr 2 17:22:55 2025 rev:35 rq:1266405 version:2.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/monitoring-plugins/monitoring-plugins.changes 2025-03-06 14:49:50.956259115 +0100 +++ /work/SRC/openSUSE:Factory/.monitoring-plugins.new.1907/monitoring-plugins.changes 2025-04-02 17:22:59.233577384 +0200 @@ -1,0 +2,6 @@ +Fri Mar 28 01:13:14 UTC 2025 - William Brown <william.br...@suse.com> + +- Backport MTU checking support for fping, and v4/v6 handling improvements + * 0001-Backport-fping-MTU-and-ipv4-6-handling-improvements.patch + +------------------------------------------------------------------- New: ---- 0001-Backport-fping-MTU-and-ipv4-6-handling-improvements.patch BETA DEBUG BEGIN: New:- Backport MTU checking support for fping, and v4/v6 handling improvements * 0001-Backport-fping-MTU-and-ipv4-6-handling-improvements.patch BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ monitoring-plugins.spec ++++++ --- /var/tmp/diff_new_pack.8mCGBR/_old 2025-04-02 17:23:00.761641505 +0200 +++ /var/tmp/diff_new_pack.8mCGBR/_new 2025-04-02 17:23:00.765641673 +0200 @@ -72,6 +72,10 @@ Patch122: %{name}-2.4.0-check_ntp_perf_absolute.patch Patch130: %{name}-2.4.0-check_http-proxy.patch Patch131: %{name}-2.4.0-check_dbi-type_mismatch.patch + +# Backport MTU checking and fixes for v4/v6 handling with dualstack IPs +Patch200: 0001-Backport-fping-MTU-and-ipv4-6-handling-improvements.patch + BuildRequires: automake BuildRequires: bind-utils BuildRequires: dhcp-devel @@ -1139,7 +1143,6 @@ --with-apt-get-command=%{apt_get_command} \ --with-cgiurl=/nagios/cgi-bin \ --with-fping-command=%{_sbindir}/fping \ - --with-fping6-command=%{_sbindir}/fping6 \ --with-ipv6 \ --with-openssl=%{_prefix} \ --with-perl=%{_bindir}/perl \ ++++++ 0001-Backport-fping-MTU-and-ipv4-6-handling-improvements.patch ++++++ >From 4b56fd1bb0c145cee5289ba8f76d8f5f1dfa9460 Mon Sep 17 00:00:00 2001 From: William <will...@blackhats.net.au> Date: Fri, 28 Mar 2025 11:08:03 +1000 Subject: [PATCH] Backport fping MTU and ipv4/6 handling improvements --- plugins/check_fping.c | 55 +++++++++++++++++++++++++++++++++---------- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/plugins/check_fping.c b/plugins/check_fping.c index 70d6f9fc..0ff48b14 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c @@ -55,6 +55,9 @@ void print_usage (void); char *server_name = NULL; char *sourceip = NULL; char *sourceif = NULL; +bool randomize_packet_data = false; +bool dontfrag = false; + int packet_size = PACKET_SIZE; int packet_count = PACKET_COUNT; int target_timeout = 0; @@ -96,6 +99,25 @@ main (int argc, char **argv) server = strscpy (server, server_name); +#ifdef PATH_TO_FPING6 + if (address_family == AF_INET6 || (address_family == AF_UNSPEC && is_inet6_addr(server))) { + fping_prog = strdup(PATH_TO_FPING6); + } else { + xasprintf(&option_string, "%s-4 ", option_string); + fping_prog = strdup(PATH_TO_FPING); + } +#else + if (address_family == AF_INET6 || (address_family == AF_UNSPEC && is_inet6_addr(server))) { + // -4 / -6 must be set explicitly as when a host has dual stack + // if we don't specify -4 then fping selects ipv6 which can mess + // with some checks. + xasprintf(&option_string, "%s-6 ", option_string); + } else { + xasprintf(&option_string, "%s-4 ", option_string); + } + fping_prog = strdup(PATH_TO_FPING); +#endif + /* compose the command */ if (target_timeout) xasprintf(&option_string, "%s-t %d ", option_string, target_timeout); @@ -105,15 +127,12 @@ main (int argc, char **argv) xasprintf(&option_string, "%s-S %s ", option_string, sourceip); if (sourceif) xasprintf(&option_string, "%s-I %s ", option_string, sourceif); - -#ifdef PATH_TO_FPING6 - if (address_family != AF_INET && is_inet6_addr(server)) - fping_prog = strdup(PATH_TO_FPING6); - else - fping_prog = strdup(PATH_TO_FPING); -#else - fping_prog = strdup(PATH_TO_FPING); -#endif + if (dontfrag) { + xasprintf(&option_string, "%s-M ", option_string); + } + if (randomize_packet_data) { + xasprintf(&option_string, "%s-R ", option_string); + } xasprintf (&command_line, "%s %s-b %d -c %d %s", fping_prog, option_string, packet_size, packet_count, server); @@ -293,7 +312,7 @@ process_arguments (int argc, char **argv) {"sourceif", required_argument, 0, 'I'}, {"critical", required_argument, 0, 'c'}, {"warning", required_argument, 0, 'w'}, - {"alive", no_argument, 0, 'a'}, + {"alive", no_argument, 0, 'a'}, {"bytes", required_argument, 0, 'b'}, {"number", required_argument, 0, 'n'}, {"target-timeout", required_argument, 0, 'T'}, @@ -303,6 +322,8 @@ process_arguments (int argc, char **argv) {"help", no_argument, 0, 'h'}, {"use-ipv4", no_argument, 0, '4'}, {"use-ipv6", no_argument, 0, '6'}, + {"dontfrag", no_argument, 0, 'M'}, + {"random", no_argument, 0, 'R'}, {0, 0, 0, 0} }; @@ -320,7 +341,7 @@ process_arguments (int argc, char **argv) } while (1) { - c = getopt_long (argc, argv, "+hVvaH:S:c:w:b:n:T:i:I:46", longopts, &option); + c = getopt_long (argc, argv, "+hVvaH:S:c:w:b:n:T:i:I:M:R:46", longopts, &option); if (c == -1 || c == EOF || c == 1) break; @@ -354,7 +375,7 @@ process_arguments (int argc, char **argv) break; case 'I': /* sourceip */ sourceif = strscpy (sourceif, optarg); - break; + break; case '4': /* IPv4 only */ address_family = AF_INET; break; @@ -415,6 +436,12 @@ process_arguments (int argc, char **argv) else usage (_("Interval must be a positive integer")); break; + case 'R': + randomize_packet_data = true; + break; + case 'M': + dontfrag = true; + break; } } @@ -506,6 +533,10 @@ void print_help (void) { printf (" %s\n", _("name or IP Address of sourceip")); printf (" %s\n", "-I, --sourceif=IF"); printf (" %s\n", _("source interface name")); + printf(" %s\n", "-M, --dontfrag"); + printf(" %s\n", _("set the Don't Fragment flag")); + printf(" %s\n", "-R, --random"); + printf(" %s\n", _("random packet data (to foil link data compression)")); printf (UT_VERBOSE); printf ("\n"); printf (" %s\n", _("THRESHOLD is <rta>,<pl>%% where <rta> is the round trip average travel time (ms)")); -- 2.48.1