Exit if BPF filter file is specified in IPS mode

This patch adds a check that was missing when specifying BPF filter
from a file. Suricata behavior should have been the same as when
BPF filter is specified on command line.
pull/852/merge
Eric Leblond 12 years ago committed by Victor Julien
parent 941cfe1641
commit a6bb86a9e0

@ -423,6 +423,13 @@ static void SetBpfStringFromFile(char *filename) {
FILE *fp = NULL;
size_t nm = 0;
if (IS_ENGINE_MODE_IPS(engine_mode)) {
SCLogError(SC_ERR_NOT_SUPPORTED,
"BPF filter not available in IPS mode."
" Use firewall filtering if possible.");
exit(EXIT_FAILURE);
}
#ifdef OS_WIN32
if(_stat(filename, &st) != 0) {
#else

Loading…
Cancel
Save