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:
commit
a4511070df
|
@ -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…
Reference in New Issue