fping 4.0+ prefers IPv6 (#14825)

Additionally fping6 is no longer a thing - this breaks IPv4 hosts entirely in a dual stack environment

It's not possible to reconcile these options, so we have to have a toggle until distro's with fping 3.x fall out of support.
This commit is contained in:
AdamB
2023-08-11 02:16:59 +01:00
committed by GitHub
parent 8bd8682bae
commit daf36ef48f

View File

@@ -46,11 +46,13 @@ class Fping
$interval = max($interval, 20);
$fping = Config::get('fping');
$fping6 = Config::get('fping6');
$fping_tos = Config::get('fping_options.tos', 0);
$cmd = [$fping];
if ($address_family == 'ipv6') {
$fping6 = Config::get('fping6');
$cmd = is_executable($fping6) ? [$fping6] : [$fping, '-6'];
} else {
$cmd = is_executable($fping6) ? [$fping] : [$fping, '-4'];
}
// build the command