Merge branch 'ent-12957-guardia-17126-error-comprobacion-version-nfdump' into 'develop'

Ent 12957 guardia 17126 error comprobacion version nfdump

See merge request artica/pandorafms!6981
This commit is contained in:
Matias Didier 2024-02-28 16:22:06 +00:00
commit a4511070df
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;
}