[Oisf-users] Problems with BPF filter in Gentoo

Duarte Silva duarte.silva at serializing.me
Fri Mar 8 20:06:33 UTC 2013


Hi all,

I have been having problems using Suricata on my Gentoo machine. The error is 
as it follows in the attachments. This also happens if I use a wired network 
interface or even if I use pcap capture mode (log file is for af-packet).

I have also attached some files that might help debugging the problem.

Thanks in advance,
Duarte Silva
-------------- next part --------------
[29644] 8/3/2013 -- 19:58:18 - (tm-threads.c:2166) <Info> (TmThreadWaitOnThreadInit) -- all 1 packet processing threads, 3 management threads initialized, engine started.
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1170) <Info> (AFPComputeRingParams) -- AF_PACKET RX Ring params: block_size=32768 block_nr=205 frame_size=1584 frame_nr=4100
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1358) <Info> (AFPCreateSocket) -- Using interface 'wlan0' via socket 7
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1420) <Info> (AFPSetBPFFilter) -- Using BPF 'wlan0' on iface 'wlan0'
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1428) <Error> (AFPSetBPFFilter) -- [ERRCODE: SC_ERR_AFP_CREATE(190)] - Filter compilation failed.
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1387) <Error> (AFPCreateSocket) -- [ERRCODE: SC_ERR_AFP_CREATE(190)] - Set AF_PACKET bpf filter "wlan0" failed.
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:964) <Error> (ReceiveAFPLoop) -- [ERRCODE: SC_ERR_AFP_CREATE(190)] - Couldn't init AF_PACKET socket
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:427) <Info> (AFPPeersListReachedInc) -- All AFP capture threads are running.
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1170) <Info> (AFPComputeRingParams) -- AF_PACKET RX Ring params: block_size=32768 block_nr=205 frame_size=1584 frame_nr=4100
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1358) <Info> (AFPCreateSocket) -- Using interface 'wlan0' via socket 7
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1420) <Info> (AFPSetBPFFilter) -- Using BPF 'wlan0' on iface 'wlan0'
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1428) <Error> (AFPSetBPFFilter) -- [ERRCODE: SC_ERR_AFP_CREATE(190)] - Filter compilation failed.
[29650] 8/3/2013 -- 19:58:18 - (source-af-packet.c:1387) <Error> (AFPCreateSocket) -- [ERRCODE: SC_ERR_AFP_CREATE(190)] - Set AF_PACKET bpf filter "wlan0" failed.
[29650] 8/3/2013 -- 19:58:19 - (source-af-packet.c:1170) <Info> (AFPComputeRingParams) -- AF_PACKET RX Ring params: block_size=32768 block_nr=205 frame_size=1584 frame_nr=4100
[29650] 8/3/2013 -- 19:58:19 - (source-af-packet.c:1358) <Info> (AFPCreateSocket) -- Using interface 'wlan0' via socket 7
[29650] 8/3/2013 -- 19:58:19 - (source-af-packet.c:1420) <Info> (AFPSetBPFFilter) -- Using BPF 'wlan0' on iface 'wlan0'
[29650] 8/3/2013 -- 19:58:19 - (source-af-packet.c:1428) <Error> (AFPSetBPFFilter) -- [ERRCODE: SC_ERR_AFP_CREATE(190)] - Filter compilation failed.
[29650] 8/3/2013 -- 19:58:19 - (source-af-packet.c:1387) <Error> (AFPCreateSocket) -- [ERRCODE: SC_ERR_AFP_CREATE(190)] - Set AF_PACKET bpf filter "wlan0" failed.
-------------- next part --------------
# ./suricata --build-info
This is Suricata version 2.0dev (rev 75130f9)
Features: PCAP_SET_BUFF LIBPCAP_VERSION_MAJOR=1 AF_PACKET HAVE_PACKET_FANOUT LIBCAP_NG LIBNET1.1 HAVE_HTP_URI_NORMALIZE_HOOK HAVE_HTP_TX_GET_RESPONSE_HEADERS_RAW PCRE_JIT HAVE_NSS HAVE_LIBJANSSON PROFILING 
64-bits, Little-endian architecture
GCC version 4.6.3, C version 199901
  __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1
  __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2
  __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
  __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
  __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
compiled with _FORTIFY_SOURCE=2
compiled with libhtp 0.2.11, linked against 0.2.11
Suricata Configuration:
  AF_PACKET support:                       yes
  PF_RING support:                         no
  NFQueue support:                         no
  IPFW support:                            no
  DAG enabled:                             no
  Napatech enabled:                        no
  Unix socket enabled:                     yes

  libnss support:                          yes
  libnspr support:                         yes
  libjansson support:                      yes
  Prelude support:                         no
  PCRE jit:                                yes
  libluajit:                               no
  libgeoip:                                yes
  Non-bundled htp:                         no
  Old barnyard2 support:                   no
  CUDA enabled:                            no

  Suricatasc install:                      yes

  Unit tests enabled:                      no
  Debug output enabled:                    no
  Debug validation enabled:                no
  Profiling enabled:                       yes
  Profiling locks enabled:                 no

Generic build parameters:
  Installation prefix (--prefix):          /opt/suricata
  Configuration directory (--sysconfdir):  /etc/suricata/
  Log directory (--localstatedir) :        /var/log/suricata/

  Host:                                    x86_64-unknown-linux-gnu
  GCC binary:                              gcc
  GCC Protect enabled:                     no
  GCC march native enabled:                yes
  GCC Profile enabled:                     no
-------------- next part --------------
[ebuild   R    ] dev-libs/jansson-2.3.1  USE="-doc -static-libs" 0 kB
[ebuild   R    ] dev-libs/nspr-4.9.5  USE="-debug" 0 kB
[ebuild   R    ] sys-libs/libcap-ng-0.6.6  USE="-python -static-libs" 0 kB
[ebuild   R    ] net-libs/libnet-1.1.6:1.1  USE="-doc -static-libs" 0 kB
[ebuild   R    ] net-libs/libpcap-1.3.0-r1  USE="bluetooth ipv6 -canusb -netlink -static-libs" 0 kB
[ebuild   R    ] dev-libs/nss-3.14.3  USE="-utils" 0 kB
[ebuild   R    ] dev-libs/libpcre-8.30-r2:3  USE="bzip2 cxx jit readline recursion-limit (unicode) zlib -pcre16 -static-libs" 1,220 kB


More information about the Oisf-users mailing list