mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
#12952 Fixed check nfdump
This commit is contained in:
parent
8f84df6aca
commit
24161241fb
@ -1916,15 +1916,10 @@ function netflow_check_nfdump_binary($nfdump_binary)
|
|||||||
$matches = [];
|
$matches = [];
|
||||||
foreach ($output as $line) {
|
foreach ($output as $line) {
|
||||||
if (preg_match('/Version:[^\d]+(\d+)\.(\d+)\.(\d+)/', $line, $matches) === 1) {
|
if (preg_match('/Version:[^\d]+(\d+)\.(\d+)\.(\d+)/', $line, $matches) === 1) {
|
||||||
if ($matches[1] < 1) {
|
if ((int) $matches[1] < 1
|
||||||
return 2;
|
|| ((int) $matches[1] === 1 && (int) $matches[2] < 6)
|
||||||
}
|
|| ((int) $matches[1] === 1 && (int) $matches[2] === 6 && (int) $matches[3] < 8)
|
||||||
|
) {
|
||||||
if ($matches[2] < 6) {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($matches[3] < 8) {
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user