mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user