#12952 Fixed check nfdump

This commit is contained in:
Daniel Maya 2024-02-28 15:33:37 +01:00
parent 8f84df6aca
commit 24161241fb
1 changed files with 4 additions and 9 deletions

View File

@ -1916,15 +1916,10 @@ function netflow_check_nfdump_binary($nfdump_binary)
$matches = [];
foreach ($output as $line) {
if (preg_match('/Version:[^\d]+(\d+)\.(\d+)\.(\d+)/', $line, $matches) === 1) {
if ($matches[1] < 1) {
return 2;
}
if ($matches[2] < 6) {
return 2;
}
if ($matches[3] < 8) {
if ((int) $matches[1] < 1
|| ((int) $matches[1] === 1 && (int) $matches[2] < 6)
|| ((int) $matches[1] === 1 && (int) $matches[2] === 6 && (int) $matches[3] < 8)
) {
return 2;
}