Merge branch 'ent-8024-source-ip-advanced-filter' into 'develop'
Ent 8024 source ip advanced filter See merge request artica/pandorafms!4430
This commit is contained in:
commit
35c877ad79
|
@ -929,7 +929,12 @@ function netflow_get_filter_arguments($filter, $safe_input=false)
|
|||
|
||||
// Normal filter.
|
||||
if ($filter['ip_dst'] != '') {
|
||||
$filter_args .= ' (';
|
||||
if ($filter_args != '') {
|
||||
$filter_args .= ' and (';
|
||||
} else {
|
||||
$filter_args .= ' (';
|
||||
}
|
||||
|
||||
$val_ipdst = explode(',', io_safe_output($filter['ip_dst']));
|
||||
for ($i = 0; $i < count($val_ipdst); $i++) {
|
||||
if ($i > 0) {
|
||||
|
@ -1754,7 +1759,9 @@ function netflow_update_second_level_filter(&$filter, $aggregate, $sources)
|
|||
$filter[$extra_filter] .= ',';
|
||||
}
|
||||
|
||||
$filter[$extra_filter] = implode(',', $sources);
|
||||
if (!empty($sources)) {
|
||||
$filter[$extra_filter] = implode(',', $sources);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue