diff -Nru smokeping-2.6.11/debian/changelog smokeping-2.6.11/debian/changelog --- smokeping-2.6.11/debian/changelog 2015-11-25 17:29:51.000000000 -0500 +++ smokeping-2.6.11/debian/changelog 2019-03-23 14:05:09.000000000 -0400 @@ -1,3 +1,13 @@ +smokeping (2.6.11-2.1) unstable; urgency=medium + + * Fix FPing 4.x usage of protocols: Ubuntu bionic ships smokeping 2.6.11 + with fping 4.0. The fix for smokeping to work properly with fping 4.0 only + entered smokeping before release of 2.7.3, so let's backport the upstream + fix so that smokeping functions correctly with fping in this LTS release. + * Import fping 4 compatibility patch from 2.7.1 release + + -- Gabriel Filion Sat, 23 Mar 2019 14:05:09 -0400 + smokeping (2.6.11-2) unstable; urgency=high * security fix for CVE-2015-0859: code execution via CGI arguments due diff -Nru smokeping-2.6.11/debian/patches/fping_4_protocol_param.patch smokeping-2.6.11/debian/patches/fping_4_protocol_param.patch --- smokeping-2.6.11/debian/patches/fping_4_protocol_param.patch 1969-12-31 19:00:00.000000000 -0500 +++ smokeping-2.6.11/debian/patches/fping_4_protocol_param.patch 2019-03-23 14:02:46.000000000 -0400 @@ -0,0 +1,63 @@ +commit 681457d0872057f79e2b2f97fa6ff8b6b415b48c +Author: Gabriel Filion +Date: Wed Aug 29 04:09:04 2018 -0400 + + FPing: create new parameter to force using IPv4 or IPv6 fixes#95 (#125) + + * FPing: create new parameter to force using IPv4 or IPv6 fixes#95 + + Starting with FPing 3.16, the IPv6 functionality was merged in the main + binary and fping now respects the system-wide setting for address + resolution. This means that when we add a target that has both an A + record and a AAAA record, the probe tests the IPv6 address by default. + + This breaks the expectation that the FPing probe tests IPv4 and that the + FPing6 probe checks IPv6. + + To restore this, we can now add a parameter to the probes to force the + protocol version to be 4 or 6. + + * FPing: set default value for protocol + + This ensures we have a meaningful default value. It was suggested by + Tobias Oetiker. + +diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm +index 8010f5f..5ee23b8 100644 +--- a/lib/Smokeping/probes/FPing.pm ++++ b/lib/Smokeping/probes/FPing.pm +@@ -119,6 +119,7 @@ sub ping ($){ + # pinging nothing is pointless + return unless @{$self->addresses}; + my @params = () ; ++ push @params, "-$self->{properties}{protocol}"; + push @params, "-b$self->{properties}{packetsize}" if $self->{properties}{packetsize}; + push @params, "-t" . int(1000 * $self->{properties}{timeout}) if $self->{properties}{timeout}; + push @params, "-i" . int(1000 * $self->{properties}{mininterval}); +@@ -197,6 +198,13 @@ sub probevars { + _example => 'true', + _doc => "Send an extra ping and then discarge the first answer since the first is bound to be an outliner.", + ++ }, ++ protocol => { ++ _re => '(4|6)', ++ _example => '4', ++ _default => '4', ++ _doc => "Choose if the ping should use IPv4 or IPv6.", ++ + }, + usestdout => { + _re => '(true|false)', +diff --git a/lib/Smokeping/probes/FPing6.pm b/lib/Smokeping/probes/FPing6.pm +index b616a35..480b6cf 100644 +--- a/lib/Smokeping/probes/FPing6.pm ++++ b/lib/Smokeping/probes/FPing6.pm +@@ -46,6 +46,8 @@ sub probevars { + my $self = shift; + my $h = $self->SUPER::probevars; + $h->{binary}{_example} = "/usr/bin/fping6"; ++ $h->{protocol}{_example} = "6"; ++ $h->{protocol}{_default} = "6"; + $h->{sourceaddress}{_re} = "[0-9A-Fa-f:.]+"; + $h->{sourceaddress}{_example} = "::1"; + return $h; diff -Nru smokeping-2.6.11/debian/patches/fping_option_compatibility.patch smokeping-2.6.11/debian/patches/fping_option_compatibility.patch --- smokeping-2.6.11/debian/patches/fping_option_compatibility.patch 1969-12-31 19:00:00.000000000 -0500 +++ smokeping-2.6.11/debian/patches/fping_option_compatibility.patch 2019-03-23 14:05:09.000000000 -0400 @@ -0,0 +1,21 @@ +commit 72ed1570fbb4ae0b90846625e1a3bd5d2bade531 +Author: Tobias Oetiker +Date: Sun Jun 25 20:19:47 2017 +0200 + + fing compatibility update. fix for #90 + +diff --git a/lib/Smokeping/probes/FPing.pm b/lib/Smokeping/probes/FPing.pm +index b3bc555..8010f5f 100644 +--- a/lib/Smokeping/probes/FPing.pm ++++ b/lib/Smokeping/probes/FPing.pm +@@ -67,8 +67,8 @@ sub new($$$) + my $binary = join(" ", $self->binary); + my $testhost = $self->testhost; + my $return = `$binary -C 1 $testhost 2>&1`; +- $self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S\s/); +- $self->{enable}{O} = (`$binary -h 2>&1` =~ /\s-O\s/); ++ $self->{enable}{S} = (`$binary -h 2>&1` =~ /\s-S[,\s]/); ++ $self->{enable}{O} = (`$binary -h 2>&1` =~ /\s-O[,\s]/); + croak "ERROR: fping ('$binary -C 1 $testhost') could not be run: $return" + if $return =~ m/not found/; + croak "ERROR: FPing must be installed setuid root or it will not work\n" diff -Nru smokeping-2.6.11/debian/patches/series smokeping-2.6.11/debian/patches/series --- smokeping-2.6.11/debian/patches/series 2015-11-25 17:29:51.000000000 -0500 +++ smokeping-2.6.11/debian/patches/series 2019-03-23 14:05:09.000000000 -0400 @@ -7,3 +7,5 @@ fix-400d-graph fix-paths-inside-executables missing-VERSION +fping_4_protocol_param.patch +fping_option_compatibility.patch