]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
12 years agounix runmode: improve JSON handling 215/head
Eric Leblond [Tue, 20 Nov 2012 09:57:16 +0000 (10:57 +0100)] 
unix runmode: improve JSON handling

The jansson function with new in their name take care of ref
counting. The this patch fixes a memory leak.

12 years agounix-manager: fix error and JSON handling
Eric Leblond [Tue, 20 Nov 2012 09:58:34 +0000 (10:58 +0100)] 
unix-manager: fix error and JSON handling

12 years agounix-manager: memory handling fixes.
Eric Leblond [Tue, 20 Nov 2012 09:28:35 +0000 (10:28 +0100)] 
unix-manager: memory handling fixes.

This patch adds unlikey() for memory error handling and fixes a few
error cases.

12 years agounix runmode: use unlikely for memory error
Eric Leblond [Tue, 20 Nov 2012 09:21:16 +0000 (10:21 +0100)] 
unix runmode: use unlikely for memory error

12 years agounix runmode: fix FIXME
Eric Leblond [Tue, 20 Nov 2012 09:17:57 +0000 (10:17 +0100)] 
unix runmode: fix FIXME

12 years agounix runmode: fix JSON mem handling
Eric Leblond [Tue, 20 Nov 2012 09:15:13 +0000 (10:15 +0100)] 
unix runmode: fix JSON mem handling

json_decref was not correctly used through the code. This patch
fixes it.

12 years agounix manager: add static
Eric Leblond [Tue, 20 Nov 2012 09:10:08 +0000 (10:10 +0100)] 
unix manager: add static

12 years agoconfigure: fix indent
Eric Leblond [Tue, 20 Nov 2012 09:09:48 +0000 (10:09 +0100)] 
configure: fix indent

12 years agoDisable 'reload-rules' command.
Eric Leblond [Mon, 19 Nov 2012 11:41:42 +0000 (12:41 +0100)] 
Disable 'reload-rules' command.

12 years agounix-manager: doc and whitespace fixes
Eric Leblond [Mon, 19 Nov 2012 10:53:29 +0000 (11:53 +0100)] 
unix-manager: doc and whitespace fixes

12 years agounix-socket: fix build when jansson not present
Eric Leblond [Mon, 19 Nov 2012 10:49:04 +0000 (11:49 +0100)] 
unix-socket: fix build when jansson not present

12 years agounix-command: add drop counter to iface-stat message
Eric Leblond [Thu, 15 Nov 2012 08:58:01 +0000 (09:58 +0100)] 
unix-command: add drop counter to iface-stat message

12 years agoAdd atomic counter for iface drop.
Eric Leblond [Thu, 15 Nov 2012 08:56:17 +0000 (09:56 +0100)] 
Add atomic counter for iface drop.

12 years agounix-command: add iface information command.
Eric Leblond [Thu, 15 Nov 2012 08:06:01 +0000 (09:06 +0100)] 
unix-command: add iface information command.

This patch adds two commands to unix-command. 'iface-list' displays
the list of interface which are sniffed by Suricata and 'iface-stat'
display the available statistics for a single interface. For now,
this is the number of packets and the number of invalid checksums.

12 years agoaf-packet: update runmode copyright date.
Eric Leblond [Thu, 15 Nov 2012 08:05:08 +0000 (09:05 +0100)] 
af-packet: update runmode copyright date.

12 years agounix-manager: fix error treatment in accept phase
Eric Leblond [Tue, 30 Oct 2012 13:35:23 +0000 (14:35 +0100)] 
unix-manager: fix error treatment in accept phase

12 years agounix-manager: implement multi client support
Eric Leblond [Mon, 29 Oct 2012 10:56:46 +0000 (11:56 +0100)] 
unix-manager: implement multi client support

This patch implements the support of multiple clients connected
at once to the unix socket.

12 years agosuricatasc: improve reading when system is loaded
Eric Leblond [Fri, 26 Oct 2012 14:21:21 +0000 (16:21 +0200)] 
suricatasc: improve reading when system is loaded

12 years agoaffinity: avoid to init structure twice
Eric Leblond [Fri, 26 Oct 2012 08:31:13 +0000 (10:31 +0200)] 
affinity: avoid to init structure twice

In unix socket mode, suricata was doing multiple init of the
structure. This was not needed and caused a memory leak in
mutex creation.

12 years agopcap-file: update affinity setting code
Eric Leblond [Fri, 26 Oct 2012 08:21:36 +0000 (10:21 +0200)] 
pcap-file: update affinity setting code

The affinity setting code was using the old API. This patch updates
to the new API and also adds a call to RunModeInitiaze() which was
missing in Single running mode.

12 years agounix-mode: fix return of pcap-file command
Eric Leblond [Fri, 26 Oct 2012 07:52:11 +0000 (09:52 +0200)] 
unix-mode: fix return of pcap-file command

12 years agounix-socket: introduce API to add commands and tasks
Eric Leblond [Thu, 25 Oct 2012 20:06:29 +0000 (22:06 +0200)] 
unix-socket: introduce API to add commands and tasks

This patch transforms the unix socket into a flexible system to
add commands (triggered by user) and taks (run periodically).
It introduces two functions UnixManagerRegisterCommand and
UnixManagerRegisterBackroundTask to registed commands and tasks.

Other part of Suricata can then declare a new command via a simple
call of the function. In the case of a command the caller is
responsible of building the answer message using Jansson API. The
sending of the message is made by unix manager code.

12 years agounix-manager: add unix command socket and associated script
Eric Leblond [Tue, 7 Feb 2012 22:48:56 +0000 (23:48 +0100)] 
unix-manager: add unix command socket and associated script

This patch introduces a unix command socket. JSON formatted messages
can be exchanged between suricata and a program connecting to a
dedicated socket.
The protocol is the following:
 * Client connects to the socket
 * It sends a version message: { "version": "$VERSION_ID" }
 * Server answers with { "return": "OK|NOK" }
If server returns OK, the client is now allowed to send command.

The format of command is the following:
 {
   "command": "pcap-file",
   "arguments": { "filename": "smtp-clean.pcap", "output-dir": "/tmp/out" }
 }
The server will try to execute the "command" specified with the
(optional) provided "arguments".
The answer by server is the following:
 {
   "return": "OK|NOK",
   "message": JSON_OBJECT or information string
 }

A simple script is provided and is available under scripts/suricatasc. It
is not intended to be enterprise-grade tool but it is more a proof of
concept/example code.  The first command line argument of suricatasc is
used to specify the socket to connect to.

Configuration of the feature is made in the YAML under the 'unix-command'
section:
  unix-command:
    enabled: yes
    filename: custom.socket
The path specified in 'filename' is not absolute and is relative to the
state directory.

A new running mode called 'unix-socket' is also added.
When starting in this mode, only a unix socket manager
is started. When it receives a 'pcap-file' command, the manager
start a 'pcap-file' running mode which does not really leave at
the end of file but simply exit. The manager is then able to start
a new running mode with a new file.

To start this mode, Suricata must be started with the --unix-socket
 option which has an optional argument which fix the file name of the
socket. The path is not absolute and is relative to the state directory.

THe 'pcap-file' command adds a file to the list of files to treat.
For each pcap file, a pcap file running mode is started and the output
directory is changed to what specified in the command. The running
mode specified in the 'runmode' YAML setting is used to select which
running mode must be use for the pcap file treatment.

This requires modification in suricata.c file where initialisation code
is now conditional to the fact 'unix-socket' mode is not used.

Two other commands exists to get info on the remaining tasks:
 * pcap-file-number: return the number of files in the waiting queue
 * pcap-file-list: return the list of waiting files
'pcap-file-list' returns a structured object as message. The
structure is the following:
 {
  'count': 2,
  'files': ['file1.pcap', 'file2.pcap']
 }

12 years agotm-threads: add TM_ECODE_DONE state
Eric Leblond [Mon, 17 Sep 2012 13:24:39 +0000 (15:24 +0200)] 
tm-threads: add TM_ECODE_DONE state

This patch adds a nex return state which can be used by threads
to warn that a task has been done. In this case, suricata does not
leave.

12 years agofilestore: create file store directory if needed
Eric Leblond [Tue, 9 Oct 2012 10:56:17 +0000 (12:56 +0200)] 
filestore: create file store directory if needed

This patch modifies the file store system to have it create the
file store directory if needed. It dos not create the full
directory tree as the parent directory must have already been
created.

12 years agocounters: management cpu set was set twice
Eric Leblond [Tue, 9 Oct 2012 16:38:34 +0000 (18:38 +0200)] 
counters: management cpu set was set twice

Setting the management CPU set on perf threads is already done in
the TmThreadCreateMgmtThread() function used to create the threads.

12 years agopcap-file: free thread var at deinit.
Eric Leblond [Thu, 18 Oct 2012 15:27:48 +0000 (17:27 +0200)] 
pcap-file: free thread var at deinit.

12 years agotm-threads: fix potential access to NULL pointer.
Eric Leblond [Tue, 9 Oct 2012 16:38:02 +0000 (18:38 +0200)] 
tm-threads: fix potential access to NULL pointer.

12 years agocounter: defensive set to NULL in free.
Eric Leblond [Wed, 17 Oct 2012 06:54:31 +0000 (08:54 +0200)] 
counter: defensive set to NULL in free.

12 years agostream-tcp: fix double call to debug print function
Eric Leblond [Tue, 23 Oct 2012 16:20:22 +0000 (18:20 +0200)] 
stream-tcp: fix double call to debug print function

12 years agoAdded parentheses to fix Eclipse static code analysis
Last G [Wed, 12 Sep 2012 19:07:10 +0000 (01:07 +0600)] 
Added parentheses to fix Eclipse static code analysis
Fixed bug in action priority (REJECT_DST had lowest prio)

12 years agoFixed missing "|" in "||" operation
Last G [Wed, 12 Sep 2012 18:09:38 +0000 (00:09 +0600)] 
Fixed missing "|" in "||" operation

12 years agoAdded parenthesis for right operation order
Last G [Wed, 12 Sep 2012 18:08:42 +0000 (00:08 +0600)] 
Added parenthesis for right operation order

12 years agoAdded return value to non-void function with "forever"-loop to fit
Last G [Wed, 12 Sep 2012 18:04:45 +0000 (00:04 +0600)] 
Added return value to non-void function with "forever"-loop to fit
Eclipse static code analysis

12 years agoAdded right return values to non-void functions with "forever" loop
Last G [Wed, 12 Sep 2012 17:59:03 +0000 (23:59 +0600)] 
Added right return values to non-void functions with "forever" loop
to fix Eclipse static code analysis

12 years agoFixes with missing return value in main function
Last G [Wed, 12 Sep 2012 17:54:54 +0000 (23:54 +0600)] 
Fixes with missing return value in main function

12 years agolist-keyword: detect non built keyword
Eric Leblond [Thu, 15 Nov 2012 13:12:10 +0000 (14:12 +0100)] 
list-keyword: detect non built keyword

This patch update the glafs list to be able to indicate that a
flag is not supported. This information is used by list-keyword to
display information to the user.

12 years agoconfigure: use pkg-config for luajit
Eric Leblond [Thu, 15 Nov 2012 13:00:47 +0000 (14:00 +0100)] 
configure: use pkg-config for luajit

If luajit includes or libs is not set in configure, we fallback to
pkg-config output.

12 years agoconfigure: exit if luajit header are not found but build ask
Eric Leblond [Thu, 15 Nov 2012 12:47:24 +0000 (13:47 +0100)] 
configure: exit if luajit header are not found but build ask

12 years agoluajit: no link with HTTP when not build.
Eric Leblond [Thu, 15 Nov 2012 12:41:05 +0000 (13:41 +0100)] 
luajit: no link with HTTP when not build.

Even when not built-in, luajit is not linked with HTTP.

12 years agoAdd documentation url in list-keyword output.
Eric Leblond [Wed, 7 Nov 2012 18:03:36 +0000 (19:03 +0100)] 
Add documentation url in list-keyword output.

The output of the list-keyword is modified to include the url to
the keyword documentation when this is available. All documented
keywords should have their link set.

list-keyword can be used with an optional value:
 no option or short: display list of keywords
 csv: display a csv output on info an all keywords
 all: display a human readable output of keywords info
 $KWD: display the info about one keyword.

12 years agoyaml: fix typo
Eric Leblond [Tue, 13 Nov 2012 14:08:42 +0000 (15:08 +0100)] 
yaml: fix typo

12 years agosuricata: add information about BPF filter usage
Eric Leblond [Wed, 7 Nov 2012 10:36:01 +0000 (11:36 +0100)] 
suricata: add information about BPF filter usage

12 years agosuricata: add '-V' info to usage message.
Eric Leblond [Wed, 7 Nov 2012 10:32:52 +0000 (11:32 +0100)] 
suricata: add '-V' info to usage message.

12 years agosuricata: add build-info command to usage message.
Eric Leblond [Wed, 7 Nov 2012 10:18:39 +0000 (11:18 +0100)] 
suricata: add build-info command to usage message.

12 years agosuricata: don't display msg in list-keyword mode.
Eric Leblond [Tue, 6 Nov 2012 18:21:42 +0000 (19:21 +0100)] 
suricata: don't display msg in list-keyword mode.

In list-keywords and list-app-layer mode, suricata now only
displays the messages linked with the feature. This allow users
to redirect the output and easily work on it. For exemple, the
csv output will be easily imported into a spreadsheet.

12 years agosuricata: update list-keyword command
Eric Leblond [Tue, 6 Nov 2012 17:32:48 +0000 (18:32 +0100)] 
suricata: update list-keyword command

This patch update the list-keyword command. Without any option,
the previous behavior is conserved. If 'all' is used as option,
suricata print a csv formatted output of keyword information:
name;features;description
If a keyword name is used as argument, suricata print a readable
message:
tls.subject
Features: state inspecting
Description: Match TLS/SSL certificate Subject field

12 years agorule analyser: display message for invalid signatures
Eric Leblond [Sat, 3 Nov 2012 09:18:42 +0000 (10:18 +0100)] 
rule analyser: display message for invalid signatures

12 years agoengine-analyzer: fix typo in message
Eric Leblond [Fri, 2 Nov 2012 21:27:50 +0000 (22:27 +0100)] 
engine-analyzer: fix typo in message

12 years agoListing of app layers does not depend on unittests
Eric Leblond [Fri, 2 Nov 2012 15:24:52 +0000 (16:24 +0100)] 
Listing of app layers does not depend on unittests

12 years agolist-keywords: fix when not using default install
Eric Leblond [Fri, 2 Nov 2012 15:21:36 +0000 (16:21 +0100)] 
list-keywords: fix when not using default install

As we don't parse the YAML file when listing of keywords is asked,
suricata make a test on existence of the build-default directory.
So with a non standard (working) install (even a single configure
without option lead to a failure), the keyword listing fails
because the default logging directory does not exist.

12 years agorule analyser: add msg if rule is ipv4 or ipv6 only
Eric Leblond [Fri, 2 Nov 2012 15:14:11 +0000 (16:14 +0100)] 
rule analyser: add msg if rule is ipv4 or ipv6 only

12 years agoreputation: report error if host table memcap reached. Work around compilation failur...
Victor Julien [Fri, 16 Nov 2012 16:42:35 +0000 (17:42 +0100)] 
reputation: report error if host table memcap reached. Work around compilation failure with atomic fallback code.

12 years agoHost: ignore usecnt add/sub result. Expose HostPrintStats.
Victor Julien [Fri, 16 Nov 2012 16:41:42 +0000 (17:41 +0100)] 
Host: ignore usecnt add/sub result. Expose HostPrintStats.

12 years agoSimple IP reputation implementation
Victor Julien [Fri, 2 Nov 2012 16:44:21 +0000 (17:44 +0100)] 
Simple IP reputation implementation

12 years agocygwin supports the thread cpu affinity code now
Victor Julien [Fri, 16 Nov 2012 09:57:50 +0000 (10:57 +0100)] 
cygwin supports the thread cpu affinity code now

12 years agoclang warning squashing
Victor Julien [Fri, 16 Nov 2012 09:09:14 +0000 (10:09 +0100)] 
clang warning squashing

12 years agoSilence compiler warnings found by clang
Victor Julien [Thu, 15 Nov 2012 15:02:44 +0000 (16:02 +0100)] 
Silence compiler warnings found by clang

12 years agobuild: more cygwin cleanups
Victor Julien [Thu, 15 Nov 2012 15:02:18 +0000 (16:02 +0100)] 
build: more cygwin cleanups

12 years agoFix use of byte swap function
Victor Julien [Thu, 15 Nov 2012 14:20:27 +0000 (15:20 +0100)] 
Fix use of byte swap function

12 years agobuild: reshuffle including headers to fix build on cygwin
Victor Julien [Thu, 15 Nov 2012 11:25:32 +0000 (12:25 +0100)] 
build: reshuffle including headers to fix build on cygwin

12 years agoundo setting exact version in configure.ac suricata-1.4beta3
Victor Julien [Wed, 14 Nov 2012 14:33:44 +0000 (15:33 +0100)] 
undo setting exact version in configure.ac

12 years agoUpdate changelog to reflect 1.4beta3 changes.
Victor Julien [Wed, 14 Nov 2012 13:56:00 +0000 (14:56 +0100)] 
Update changelog to reflect 1.4beta3 changes.

12 years agolibhtp: updated bundled libhtp to 0.2.11
Victor Julien [Wed, 14 Nov 2012 11:48:43 +0000 (12:48 +0100)] 
libhtp: updated bundled libhtp to 0.2.11

12 years agofix uninit var usage in hhd
Anoop Saldanha [Wed, 14 Nov 2012 09:29:40 +0000 (14:59 +0530)] 
fix uninit var usage in hhd

12 years agologging: add warning if no output module is selected
Eric Leblond [Sun, 11 Nov 2012 19:59:27 +0000 (20:59 +0100)] 
logging: add warning if no output module is selected

If no daemon compatible logging module is selected, a message is
displayed to avoid the user to look like mad for messages.

12 years agoinstall: create state dir with install-conf
Eric Leblond [Sun, 11 Nov 2012 19:25:22 +0000 (20:25 +0100)] 
install: create state dir with install-conf

12 years agosuricata: don't exit if pidfile can't be created
Eric Leblond [Sun, 11 Nov 2012 17:47:07 +0000 (18:47 +0100)] 
suricata: don't exit if pidfile can't be created

12 years agosuricata: display PID file name in case of error.
Eric Leblond [Sun, 11 Nov 2012 17:25:57 +0000 (18:25 +0100)] 
suricata: display PID file name in case of error.

12 years agoAdd contrib dir and it's content to the dist. Bug 567
Victor Julien [Wed, 14 Nov 2012 08:30:27 +0000 (09:30 +0100)] 
Add contrib dir and it's content to the dist. Bug 567

12 years agobyte_jump: when from_beginning option is used, the number of bytes to convert should...
Victor Julien [Tue, 13 Nov 2012 16:49:41 +0000 (17:49 +0100)] 
byte_jump: when from_beginning option is used, the number of bytes to convert should not be used in the jump. Bug 627.

12 years agopcap: add capture counters in stats.log. 196/head
Eric Leblond [Mon, 12 Nov 2012 17:34:50 +0000 (18:34 +0100)] 
pcap: add capture counters in stats.log.

This patch adds three counters to stats.log:
    capture.kernel_packets    | RxPcapwlan0               | 4218
    capture.kernel_drops      | RxPcapwlan0               | 0
    capture.kernel_ifdrops    | RxPcapwlan0               | 0
This patch meant to fix bug #625.

12 years agopkt-data: don't compile unittest unless unittests are enabled
Victor Julien [Sun, 11 Nov 2012 20:28:40 +0000 (21:28 +0100)] 
pkt-data: don't compile unittest unless unittests are enabled

12 years agobuild: more checking for includes
Victor Julien [Sun, 11 Nov 2012 20:24:16 +0000 (21:24 +0100)] 
build: more checking for includes

12 years agoconfigure formatting fixes
Victor Julien [Sun, 11 Nov 2012 14:42:52 +0000 (15:42 +0100)] 
configure formatting fixes

12 years agobuild cleanup, build source files in alphabetical order
Victor Julien [Sun, 11 Nov 2012 14:25:15 +0000 (15:25 +0100)] 
build cleanup, build source files in alphabetical order

12 years agobuild cleanups
Victor Julien [Fri, 2 Nov 2012 14:34:54 +0000 (15:34 +0100)] 
build cleanups

13 years agococcinelle: fix distcheck
Eric Leblond [Fri, 9 Nov 2012 17:41:52 +0000 (18:41 +0100)] 
coccinelle: fix distcheck

distcheck is running run_check.sh from another directory and
run_check.sh was not ready for this.

13 years agominor misc changes: update htp ver, add htp ver to --build-info, clean up
Victor Julien [Fri, 9 Nov 2012 18:51:43 +0000 (19:51 +0100)] 
minor misc changes: update htp ver, add htp ver to --build-info, clean up

13 years agoKeyword pkt_data
Xavier Lange [Fri, 9 Nov 2012 16:37:24 +0000 (08:37 -0800)] 
Keyword pkt_data

13 years agobackport oom fixes
Eric Leblond [Wed, 7 Nov 2012 11:39:05 +0000 (12:39 +0100)] 
backport oom fixes

This is a backport of
https://github.com/ironbee/libhtp/commit/9ea5e0e3e4f84f54914d10ee50f618aa575bafe1

13 years agonapatech: treat malloc error 190/head
Eric Leblond [Fri, 9 Nov 2012 15:18:35 +0000 (16:18 +0100)] 
napatech: treat malloc error

13 years agococcinelle: improve run_check
Eric Leblond [Fri, 9 Nov 2012 14:57:52 +0000 (15:57 +0100)] 
coccinelle: improve run_check

This patch adds two features to run_check.sh, it is now posssible
to specify a list of files to check:
 ./run_check.sh ../../src/suricata.c ../../src/detect.c
It is also possible to ask a review of the files modified by a commit.
To so simply put the SHA1 as argument
 ./run_check.sh HEAD
 ./run_check 6af7d5f
It is also possible to check all the files for an arbitrary range:
 ./run_check.sh origin/master..buildbot-fixes

Last improvement of this patch is to get a real error message in case
of problem as 2 is not redirected anymore to /dev/null.

13 years agococcinelle: add new correct case to error treatment
Eric Leblond [Thu, 8 Nov 2012 23:09:06 +0000 (00:09 +0100)] 
coccinelle: add new correct case to error treatment

13 years agosuricata: add daemon-directory config variable
Eric Leblond [Fri, 5 Oct 2012 07:46:18 +0000 (09:46 +0200)] 
suricata: add daemon-directory config variable

It is now possible to use the 'daemon-directory' configuration
variable to specify the working directory of suricata in daemon
mode. This will permit to specify the place for core and other
related files.

13 years agosuricata: avoid concurrent run in daemon mode
Eric Leblond [Fri, 5 Oct 2012 07:35:48 +0000 (09:35 +0200)] 
suricata: avoid concurrent run in daemon mode

This patch creates a pid file per default and use it to avoid to be
able to run two Suricata. Separate pid file have to be provided to
be able to do it.

13 years agosuricata: change dir to / in daemon mode.
Eric Leblond [Fri, 5 Oct 2012 06:26:16 +0000 (08:26 +0200)] 
suricata: change dir to / in daemon mode.

By changing directory to /, we will not block the directory where
suricata has been started.

13 years agoRefactor Napatech 3GD to just Napatech as Suricata is only going to support 3GD.
Matt Keeler [Thu, 8 Nov 2012 16:48:17 +0000 (11:48 -0500)] 
Refactor Napatech 3GD to just Napatech as Suricata is only going to support 3GD.

Signed-off-by: Matt Keeler <mk@npulsetech.com>
13 years agoRemove Napatech 2GD support
Matt Keeler [Thu, 8 Nov 2012 16:28:11 +0000 (11:28 -0500)] 
Remove Napatech 2GD support

Removed the Napatech 2GD support

runmode-napatech-3gd.c had an include from runmode-napatech.h which was erroneous and has been removed as well.

Signed-off-by: Matt Keeler <mk@npulsetech.com>
13 years agoconfigure: fix small typo. 187/head
Eric Leblond [Thu, 8 Nov 2012 22:47:27 +0000 (23:47 +0100)] 
configure: fix small typo.

13 years agoconfigure: improve march=native detection
Eric Leblond [Thu, 8 Nov 2012 22:39:20 +0000 (23:39 +0100)] 
configure: improve march=native detection

clang is supposed to support march=native but if the CPU is too
recent for clang, this can cause an invalid detection of arch and
result in a incapability of clang to compile any binary.
This patch updates the test to try a compilation with march=native
when clang is the used compiler.

13 years agoconfigure: differentiate gcc and clang options
Eric Leblond [Thu, 8 Nov 2012 21:09:22 +0000 (22:09 +0100)] 
configure: differentiate gcc and clang options

The version checking was made similarly for clang and gcc. This
patch modifies this to check on compiler name. This way we can
avoid to set march=native which is not supported by clang on
some system.
At the same time, this fix the annoying warning about no-fp-tree
being unsupported by clang.

13 years agoRemove unnecessary debug message
Victor Julien [Thu, 8 Nov 2012 13:03:35 +0000 (14:03 +0100)] 
Remove unnecessary debug message

13 years agoOpenBSD 5.2 build fixes, Unit test fix.
Victor Julien [Thu, 8 Nov 2012 08:47:02 +0000 (09:47 +0100)] 
OpenBSD 5.2 build fixes, Unit test fix.

13 years agosuricata: add run-as.user and run-as.group yaml var
Eric Leblond [Tue, 6 Nov 2012 13:35:07 +0000 (14:35 +0100)] 
suricata: add run-as.user and run-as.group yaml var

This patch update the YAML to be able to specify the user or the
group to run Suricata as:
 run-as:
   user: suri
   group: suri

13 years agopcap: ref config according to threads count
Eric Leblond [Mon, 5 Nov 2012 21:08:40 +0000 (22:08 +0100)] 
pcap: ref config according to threads count

13 years agoyaml: document the threads setting in pcap section.
Eric Leblond [Mon, 5 Nov 2012 19:26:32 +0000 (20:26 +0100)] 
yaml: document the threads setting in pcap section.

13 years agoSilence compiler warning if napatech3 support is disabled
Victor Julien [Wed, 7 Nov 2012 09:34:20 +0000 (10:34 +0100)] 
Silence compiler warning if napatech3 support is disabled

13 years agoNapatech 3GD Support 177/head
Matt Keeler [Thu, 4 Oct 2012 16:34:00 +0000 (12:34 -0400)] 
Napatech 3GD Support

For use with Network Cards from Napatech utilizing the 3GD driver/api.

    - Implemented new run modes in runmode-napatech-3gd.*
    - Implemented capture/decode threads in source-napatech-3gd.*
    - Integrated the new run modes and source into the build infrastructure.

    New configure switches
    --enabled-napatech-3gd : Turns on the NT 3GD support
    --with-napatech-3gd-includes : The directory containing the NT 3GD header files
    --with-napatech-3gd-libraries : The directory containing the NT 3GD libraries to link against.

    New CLI switch
    --napatech-3gd : Uses the Napatech 3GD run mode

    Runmodes Supported:
    - auto
    - autofp
    - workers

    Notes:
    - tested with 1 Gbps sustained traffic (no drops)

Signed-off-by: Matt Keeler <mk@npulsetech.com>
13 years agogcc: construct use for warning was too recent.
Eric Leblond [Sat, 3 Nov 2012 09:09:22 +0000 (10:09 +0100)] 
gcc: construct use for warning was too recent.