Drop packets that don't pass the filter in recv
This commit is contained in:
parent
29c291c562
commit
9df8f678a3
@ -34,6 +34,7 @@
|
||||
#include "state.h"
|
||||
#include "validate.h"
|
||||
#include "fieldset.h"
|
||||
#include "expression.h"
|
||||
#include "probe_modules/probe_modules.h"
|
||||
#include "output_modules/output_modules.h"
|
||||
|
||||
@ -141,6 +142,10 @@ void packet_cb(u_char __attribute__((__unused__)) *user,
|
||||
if (is_repeat && zconf.filter_duplicates) {
|
||||
goto cleanup;
|
||||
}
|
||||
if (!evaluate_expression(zconf.filter.expression, fs)) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
o = translate_fieldset(fs, &zconf.fsconf.translation);
|
||||
if (zconf.output_module && zconf.output_module->process_ip) {
|
||||
zconf.output_module->process_ip(o);
|
||||
|
Loading…
Reference in New Issue
Block a user