Commit Graph

91 Commits (9e0355023033956f89b705592a15b237044cb534)

Author SHA1 Message Date
Victor Julien 0f70e8f225 OpenBSD: set correct magic path
For all 5.x OpenBSDs it seems the magic path is:
    /usr/local/share/misc/magic.mgc
11 years ago
Victor Julien ddf9b417d7 configure: simplify OpenBSD handling
Treat all OpenBSD versions in the same way. No more -fgnu89-inline.
11 years ago
Victor Julien 42227e8713 configure: fix typo in libjansson warning message 11 years ago
Ken Steele 65d8ae937d Remove extra ] configure.ac for HAVE_DETECT_DISABLED
Saw a warning about unknow command ']' running distcheck and tracked it back
to this error.
11 years ago
Ken Steele 497575d38e Add option on Tile-Gx for logging for fast.log alerts over PCIe
When running on a TILEncore-Gx PCIe card, setting the filetype of fast.log
to pcie, will open a connection over PCIe to a host application caleld
tile-pcie-logd, that receives the alert strings and writes them to a file
on the host. The file name to open is also passed over the PCIe link.

This allows running Suricata on the TILEncore-Gx PCIe card, but have the
alerts logged to the host system's file system efficiently. The PCIe API that
is used is the Tilera Packet Queue (PQ) API which can access PCIe from User
Space, thus avoiding system calls.

Created util-logopenfile-tile.c and util-logopen-tile.h for the TILE
specific PCIe logging functionality.

Using Write() and Close() function pointers in LogFileCtx, which
default to standard write and close for files and sockets, but are
changed to PCIe write and close functions when a PCIe channel is
openned for logging.

Moved Logging contex out of tm-modules.h into util-logopenfile.h,
where it makes more sense. This required including util-logopenfile.h
into a couple of alert-*.c files, which previously were getting the
definitions from tm-modules.h.

The source and Makefile for tile-pcie-logd are added in contrib/tile-pcie-logd.

By default, the file name for fast.log specified in suricata.yaml is used as
the filename on the host. An optional argument to tile-pcie-logd, --prefix=,
can be added to prepend the supplied file path. For example, is the file
in suricata.yaml is specified as "/var/log/fast.log" and --prefix="/tmp",
then the file will be written to "/tmp/var/log/fast.log".

Check for TILERA_ROOT environment variable before building tile_pcie_logd

Building tile_pcie_logd on x86 requires the Tilera MDE for its PCIe libraries
and API header files. Configure now checs for TILERA_ROOT before enabling
builing tile_pcie_logd in contrib/tile_pcie_logd
11 years ago
Victor Julien 8623b8f941 prelude: fix configure and cleanup
Fixes configure enabling of prelude. CFLAGS is reset, so the previous
adding of -DPRELUDE was nixed. Using AC_DEFINE now.

Cleanups:
- make functions static
- simplify handling of no prelude support
- move registration to the bottom
11 years ago
Victor Julien f4872a2f08 Add --disable-detection configure option
Add --disable-detection configure option to compile Suricata with
detection disabled.
11 years ago
Victor Julien 06f9b0adbf Cygwin: make configure pass with -Werror 11 years ago
Victor Julien 2eeddf969d Cygwin: fix compilation
tm-threads.c:1190:5: error: unknown type name ‘DWORD’
11 years ago
Victor Julien e4b39a413a Fix coccinelle autotools check 11 years ago
Victor Julien 7fb860ac47 coccinelle: add --disable-coccinelle to configure
This allows disabling of the expensive cocci QA checks during
QA.
11 years ago
Ken Steele bc29684df4 Remove GCC -no-strict-aliasing compiler flag.
GCC typically generates better code without the -no-strict-aliasing flag.
It is only required if code makes assumptiosn that break strict aliasing.
The unit tests pass on x86 and Tile without the flag.
11 years ago
Ken Steele f0c785cc1d Fix configuring Prelude with -Werror
Running with:

CFLAGS="-Werror" ./configure

would fail when configuring libprelude because of an unused-result
warning. Ignore that one warning.
11 years ago
Eric Leblond a75911e02f pfring: workaround potential librt deps
It seems some version of pfring needs to be link with librt.
11 years ago
Ken Steele 3d81e50ab3 Check for compiler for -march=native support
Check all compilers to see if they support the -march=native flags, rather
than assuming gcc 4.2 or later does. Tile GCC doesn't currently support it,
so not checking break Tile compiles.
11 years ago
Eric Leblond fcc8759561 util-ioctl: add GRO/LRO detection capabilities
This patch adds a new function GetIfaceOffloading which return 0
if LRO and GRO are not set on a interface and 1 if not the case.
11 years ago
Eric Leblond 64cd49da31 configure: accept libnet 1.1 and 1.2. 11 years ago
Victor Julien 0bfba8352d pcre: check for pcre_free_study, fall back to pcre_free if it unavailable 11 years ago
Victor Julien c8b71938ff Add a fallback memrchr implementation for those platforms that dont support it. Bug #963. 11 years ago
Eric Leblond daa9dcb75f Use wget or curl to download ruleset. 11 years ago
Victor Julien 900918a5d1 Bug #948: detect thread local storage support 11 years ago
Ken Steele 1bbbcf5120 Make the missing libhtp error message more clear.
Use exact git clone command and then rerun autogen.sh and configure.
11 years ago
Ken Steele 149d2a0793 Fix typo in configure.ac echo message 11 years ago
Anoop Saldanha f85a2dc84b fix for #875.
Update configure.ac to check for either 0.5.5 and 0.5.x version of libhtp.
11 years ago
Victor Julien 8060ef41af configure: add iconv.h check to configure if bundled libhtp is used 11 years ago
Victor Julien 83014adcfa Fix autogen on older systems 11 years ago
Eric Leblond 0cef0b8808 configure: minor cleaning 11 years ago
Eric Leblond 7dbc97b01c autotools: AM_INIT_AUTOMAKE with args is deprecated 11 years ago
Eric Leblond c099349550 configure: check for iconv in htp embedded mode
At least on freebsd, suricata fails to build in htp embedded mode
due to iconv linking issue.
11 years ago
Eric Leblond 0c37f76fa2 Check for local include first. 11 years ago
Victor Julien fdc3b5ba15 Fix CLS configure check 11 years ago
Anoop Saldanha 48cf0585fb Suricata upgrade to libhtp 0.5.x.
Remove the support for now unsupported personalities from libhtp -
TOMCAT_6_0, APACHE and APACHE_2_2.  We instead use the APACHE_2
personality.
11 years ago
Victor Julien 4749420f32 Use relative dir instead of ac_builddir
When generating src/build-info.h the use of ac_builddir was problematic.
There were several cases where it was undefined leading to the absolute
path /src/build-info.h. ./configure should be called from the parent dir
to the actual src dir, so this should work. Make distcheck and normal builds
complete fine.
11 years ago
Victor Julien aafc65c757 Autotools: move libhtp conditionals to configure
In preparation of the libhtp upgrade, move all libhtp related conditionals
to configure. This allows for one set of build scripts that works regardless
of the presence of a local libhtp dir.
11 years ago
Victor Julien 55625d738a TLS: create certs dir on 'make install-full'. Bug #711. 11 years ago
Anoop Saldanha 68847d12e3 Update configure.ac to use the default value of 64 for the cache line size
for systems which return a value of 0.
11 years ago
Ken Steele 3db717db6d Update configure.ac to detect Tile architecture.
Detect if the architecture supports the Tilera mPipe packet processing
hardware. It it does, add the requried libraries and define HAVE_MPIPE.
12 years ago
Victor Julien 71c22ddfee Move fallback to CLS detection to configure script. 12 years ago
Victor Julien 0ddd57cb05 Fix CLS detection on systems that have getconf, but don't support the LEVEL1_DCACHE_LINESIZE option. 12 years ago
Victor Julien 724ad9e8e7 Detect L1 cache line size at build time. Fall back to 64 bytes if detection failed. 12 years ago
Victor Julien b7c759fdf4 NFQ: fix configure check for finding out signed/unsigned args for nfq_get_payload 12 years ago
Florian Westphal 8da02115c9 nfq: add support for batch verdicts
Normally, there is one verdict per packet, i.e., we receive a packet,
process it, and then tell the kernel what to do with that packet (eg.
DROP or ACCEPT).

recv(), packet id x
send verdict v, packet id x
recv(), packet id x+1
send verdict v, packet id x+1
[..]
recv(), packet id x+n
send verdict v, packet id x+n

An alternative is to process several packets from the queue, and then send
a batch-verdict.

recv(), packet id x
recv(), packet id x+1
[..]
recv(), packet id x+n
send batch verdict v, packet id x+n

A batch verdict affects all previous packets (packet_id <= x+n),
we thus only need to remember the last packet_id seen.

Caveats:
- can't modify payload
- verdict is applied to all packets
- nfmark (if set) will be set for all packets
- increases latency (packets remain queued by the kernel
  until batch verdict is sent).

To solve this, we only defer verdict for up to 20 packets and
send pending batch-verdict immediately if:
- no packets are currently queue
- current packet should be dropped
- current packet has different nfmark
- payload of packet was modified

This patch adds a configurable batch verdict support for workers runmode.
The batch verdicts are turned off by default.

Problem is that batch verdicts only work with kernels >= 3.1, i.e.
using newer libnetfilter_queue with an old kernel means non-working
suricata. So the functionnality has to be disabled by default.
12 years ago
Eric Leblond 6913109bf3 configure: use correct syntax for help string 12 years ago
Eric Leblond 7d706563ef configure: add --enable-unix-socket flag
This new flag allows the user to force unix socket build or to
disallow it completely. Default which is test is maintained.
12 years ago
Eric Leblond 0470c0f678 jansson: change function test to be sure of version 12 years ago
Victor Julien 04d7d00df6 Try to use pkg-config to resolve libnspr and related dependencies. 12 years ago
Christian Kreibich cb8e5bc533 Try to use pkg-config to resolve libnss and related dependencies. 12 years ago
Victor Julien eeb439c1a3 Open 2.0 dev branch 12 years ago
Jason Ish eae4de9850 Replace the deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS.
Addresses bug #704 for building on a Mac.  More generically
it addresses the issue building using newers versions of automake.
12 years ago
Eric Leblond cd305c3a78 suricatasc: update python packaging
'make install' install now suricatasc script and Python module to
the system. The suricatasc client module can now be used in other
Python projects by using 'import suricatasc'.

A transformation was needed for distribution of a module and a script.
Module in src directory is now containing most of the code and the
script only handle argument parsing and the creation of a unix socket
client through 'suricatasc' module.
12 years ago