]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
12 years agosolaris: fix compilation failure
Eric Leblond [Fri, 2 Aug 2013 10:52:28 +0000 (12:52 +0200)] 
solaris: fix compilation failure

This patch fixes a compilation failure on Solaris. Compiler does
not support when a function returning void is used in return of
an other function returning void.

12 years agoMake the missing libhtp error message more clear.
Ken Steele [Tue, 30 Jul 2013 15:03:26 +0000 (11:03 -0400)] 
Make the missing libhtp error message more clear.

Use exact git clone command and then rerun autogen.sh and configure.

12 years agoFormatting change for function call.
Ken Steele [Wed, 28 Aug 2013 14:43:37 +0000 (10:43 -0400)] 
Formatting change for function call.

Put open brace { for function on a new line to match coding standard.

Changed:

int foo(int x) {
}

to:

int foo(int x)
{
}

12 years agoClean up SCLocalTime() usage
Ken Steele [Tue, 27 Aug 2013 21:16:59 +0000 (17:16 -0400)] 
Clean up SCLocalTime() usage

Remove cast of return type from SCLocalTime() as it is not needed.
Replace last use of localtime_r() with SCLocalTime().

12 years agoOn Open BSD systems don't cache time.
Ken Steele [Fri, 30 Aug 2013 16:34:43 +0000 (12:34 -0400)] 
On Open BSD systems don't cache time.

Open BSD doesn't support __thread, which is used for time caching, so
don't do time chaching for BSD systems.

12 years agoCache time conversions for localtime() and CreateTimeString()
Ken Steele [Tue, 27 Aug 2013 20:38:22 +0000 (16:38 -0400)] 
Cache time conversions for localtime() and CreateTimeString()

When converting a time in seconds (64-bit seconds since 1970) to
Month/Day/Year hours minutes, Suricata calls localtime_r(), which
always aquires a lock and then does complex comutation based on the
current time zone. The time zone can be specified in the TZ
environment variable, which is only parsed the first time it is used,
or from a file. The default file is /etc/localtime. The file is
checked each time to see if it might have changed and is reparsed if
it has changed.

The GLIBC library has a lock inside localtime_r(), which limits
parallelism, which is a problem when the rate of generating alerts is
high, since Suricata generates a new ascii time string for each alert
into fast.log.

This change caches the value returned by localtime_t() and then sets
the seconds within the minute based on the cached start-of-minute
time. All of the values return, expect for the seconds, is constant
within the same minute. Switching to a new seconds could change all
the other values, year, month, day, hour. The cache stores the current
and previous minute values.

The same trick is used in CreateTimeString() for generated time
string. The string, up to the minutes, is cached and then copied into
the result string, followed by printing the new seconds into the
result string.

The seconds within a minute are calculated as the difference in
seconds from the start of the current minute.

12 years agoMerge multiple copies of CreateTimeString() to one copy.
Ken Steele [Tue, 20 Aug 2013 16:03:52 +0000 (12:03 -0400)] 
Merge multiple copies of CreateTimeString() to one copy.

There were 8 identical copies of CreateTimeString() in 8 files.
Most used SCLocalTime, to replace localtime_r(), but some did not.
Created one copy in util-time.c.

12 years agoCreate SCMUTEX_INITIALIZER to abstract out PTHREAD_MUTEX_INITIALIZER
Ken Steele [Tue, 6 Aug 2013 18:49:31 +0000 (14:49 -0400)] 
Create SCMUTEX_INITIALIZER to abstract out PTHREAD_MUTEX_INITIALIZER

This allows replacing pthread mutexes with other types of mutex.

12 years agoUse Tilera SIMD for Signature matching ala SSE3
Ken Steele [Thu, 1 Aug 2013 03:15:46 +0000 (23:15 -0400)] 
Use Tilera SIMD for Signature matching ala SSE3

Makes use of 8-wide byte compare instructions in signature matching.

For allocating aligned memory, _mm_malloc() is SSE only, so added
check for __tile__ to use memalign() instead.

Shows a 13% speed up.

12 years agoTile SIMD implementation of SCMemcmp and SCMemcmpLowercase
Ken Steele [Wed, 31 Jul 2013 19:05:04 +0000 (15:05 -0400)] 
Tile SIMD implementation of SCMemcmp and SCMemcmpLowercase

Based on the SSE3 implementation, it checks 8 bytes at a time.

12 years agofix for #932. 515/head
Anoop Saldanha [Sat, 31 Aug 2013 16:13:06 +0000 (21:43 +0530)] 
fix for #932.

ipv6 tunnel decoder wrongly treats the tunneled ipv6 packets as an ipv4
packet.

12 years agofix for #920. 508/head
Anoop Saldanha [Fri, 30 Aug 2013 03:41:39 +0000 (09:11 +0530)] 
fix for #920.

Cull the space before the address specified in address var variables.

12 years agoNow using the common functions
Duarte Silva [Tue, 30 Jul 2013 15:17:34 +0000 (16:17 +0100)] 
Now using the common functions

12 years agoNow using the common functions
Duarte Silva [Tue, 30 Jul 2013 15:16:41 +0000 (16:16 +0100)] 
Now using the common functions
- Removed some non printable ANSI characters
- Removed unecessary include

12 years agoAdded the new files containing the repeated functions
Duarte Silva [Tue, 30 Jul 2013 15:10:44 +0000 (16:10 +0100)] 
Added the new files containing the repeated functions
- Renamed the functions to something more generic
- Added the source and include files to the Makefile

12 years agoFixes segv inside rule swap under low mem conditions.
Anoop Saldanha [Tue, 30 Jul 2013 14:02:11 +0000 (19:32 +0530)] 
Fixes segv inside rule swap under low mem conditions.

We now gracefully exit rule swap on any allocation or other failures.

12 years agoRearrange ac state.
Anoop Saldanha [Thu, 14 Mar 2013 13:25:52 +0000 (18:55 +0530)] 
Rearrange ac state.

Notice a minor speed bump of around 2% on runs.  More updates to follow.

12 years agoEnable using Tile cycle counter.
Ken Steele [Tue, 27 Aug 2013 21:04:07 +0000 (17:04 -0400)] 
Enable using Tile cycle counter.

The Tile processors all have a cycle counter with a simple interface. Use
that for UtilCpuGetTicks.

12 years agoIsRuleReloadSet() shouldn't return an uninitialized value
Victor Julien [Wed, 28 Aug 2013 18:22:09 +0000 (20:22 +0200)] 
IsRuleReloadSet() shouldn't return an uninitialized value

12 years agounittests: fix stream-tcp.c
Eric Leblond [Tue, 27 Aug 2013 08:10:25 +0000 (10:10 +0200)] 
unittests: fix stream-tcp.c

Lock and recycle fixes for stream-tcp.c

12 years agounittests: some functions needs a flow lock.
Eric Leblond [Tue, 27 Aug 2013 07:09:11 +0000 (09:09 +0200)] 
unittests: some functions needs a flow lock.

In debug validation mode, it is required to call application layer
parsing and other functions with a lock on flow. This patch updates
the code to do so.

12 years agounittest: recycle packet before exit
Eric Leblond [Tue, 27 Aug 2013 06:52:57 +0000 (08:52 +0200)] 
unittest: recycle packet before exit

To avoid an issue with flow validation, we need to recycle the packet
before cleaning the flow.

12 years agofix for #915. Fix segv when we send NULL to snprintf.
Anoop Saldanha [Thu, 1 Aug 2013 12:22:48 +0000 (17:52 +0530)] 
fix for #915.  Fix segv when we send NULL to snprintf.

12 years agopf_ring: avoid to ask for extended header. 489/head
Eric Leblond [Thu, 1 Aug 2013 10:16:05 +0000 (12:16 +0200)] 
pf_ring: avoid to ask for extended header.

This patch update pf_ring capture to avoid to ask for extended
header. They are only needed when rxonly checksum checks is used
and this is only possible when interface is not a DNA interface.

12 years agoFix Tile compile
Victor Julien [Wed, 31 Jul 2013 05:26:09 +0000 (07:26 +0200)] 
Fix Tile compile

12 years agofix pf_ring build 483/head
Eric Leblond [Tue, 30 Jul 2013 16:35:19 +0000 (18:35 +0200)] 
fix pf_ring build

12 years agosuricata: rename SuriInstance to SCInstance. 479/head
Eric Leblond [Tue, 30 Jul 2013 12:40:47 +0000 (14:40 +0200)] 
suricata: rename SuriInstance to SCInstance.

12 years agosuricata: suppress Suri prefix
Eric Leblond [Mon, 29 Jul 2013 14:19:03 +0000 (16:19 +0200)] 
suricata: suppress Suri prefix

Suppress Suri prefix in internal function name.

12 years agoUse a typedef for SuriInstance.
Eric Leblond [Thu, 4 Jul 2013 08:10:36 +0000 (10:10 +0200)] 
Use a typedef for SuriInstance.

12 years agoAdd offline flag to SuriInstance and some refactoring
Eric Leblond [Tue, 28 May 2013 14:46:45 +0000 (16:46 +0200)] 
Add offline flag to SuriInstance and some refactoring

12 years agoPrefix util-conf function with Config
Eric Leblond [Tue, 28 May 2013 09:23:55 +0000 (11:23 +0200)] 
Prefix util-conf function with Config

12 years agoMove CreateLowercaseTable to GLobalInits
Eric Leblond [Tue, 28 May 2013 09:17:15 +0000 (11:17 +0200)] 
Move CreateLowercaseTable to GLobalInits

12 years agoGeneric code don't need ifdef
Eric Leblond [Tue, 28 May 2013 09:12:19 +0000 (11:12 +0200)] 
Generic code don't need ifdef

12 years agoUse function for delayed detect setup.
Eric Leblond [Tue, 14 May 2013 13:49:51 +0000 (15:49 +0200)] 
Use function for delayed detect setup.

12 years agoAdd functions for elapsed time computation.
Eric Leblond [Tue, 14 May 2013 09:09:48 +0000 (11:09 +0200)] 
Add functions for elapsed time computation.

12 years agoFactorize Signature loading
Eric Leblond [Tue, 14 May 2013 08:38:11 +0000 (10:38 +0200)] 
Factorize Signature loading

12 years agoUse function for daemonification and signal handler
Eric Leblond [Fri, 10 May 2013 08:39:23 +0000 (10:39 +0200)] 
Use function for daemonification and signal handler

12 years agoset rule_reload as part of SuriInstance
Eric Leblond [Fri, 10 May 2013 08:27:17 +0000 (10:27 +0200)] 
set rule_reload as part of SuriInstance

12 years agoSetBPfString is part of command line parsing
Eric Leblond [Fri, 10 May 2013 08:22:24 +0000 (10:22 +0200)] 
SetBPfString is part of command line parsing

12 years agosuricata: use function to print version
Eric Leblond [Fri, 10 May 2013 07:43:59 +0000 (09:43 +0200)] 
suricata: use function to print version

12 years agoAdd function for internal running mode
Eric Leblond [Tue, 7 May 2013 16:03:27 +0000 (18:03 +0200)] 
Add function for internal running mode

12 years agosuricata: windows specific in one function
Eric Leblond [Tue, 7 May 2013 15:53:21 +0000 (17:53 +0200)] 
suricata: windows specific in one function

12 years agoRunning mode is set earlier so out earlier
Eric Leblond [Tue, 7 May 2013 12:20:33 +0000 (14:20 +0200)] 
Running mode is set earlier so out earlier

12 years agokill remaining run_mode usage
Eric Leblond [Tue, 7 May 2013 12:15:56 +0000 (14:15 +0200)] 
kill remaining run_mode usage

12 years agoengine analysis is a running mode
Eric Leblond [Tue, 7 May 2013 12:11:49 +0000 (14:11 +0200)] 
engine analysis is a running mode

12 years agoget (almost) rid of run_mode variable.
Eric Leblond [Tue, 7 May 2013 12:01:03 +0000 (14:01 +0200)] 
get (almost) rid of run_mode variable.

12 years agoadd internal running mode
Eric Leblond [Tue, 7 May 2013 11:44:27 +0000 (13:44 +0200)] 
add internal running mode

12 years agoAdd SuriInstance structure
Eric Leblond [Wed, 17 Apr 2013 11:37:40 +0000 (13:37 +0200)] 
Add SuriInstance structure

To be able to split code in functions in main, we need to pass
information about the current running Suricata to functions.
For that we create a structure to store suricata run parameters.

In this patch it allows to separate command line parsing and to
treat internal running mode in a switch just after command line
parsing.

12 years agoExport IsRuleReloadSet and use it.
Eric Leblond [Tue, 30 Jul 2013 13:21:55 +0000 (15:21 +0200)] 
Export IsRuleReloadSet and use it.

12 years agounittest: make check use a qa/log dir for logging 472/head
Eric Leblond [Tue, 30 Jul 2013 08:44:29 +0000 (10:44 +0200)] 
unittest: make check use a qa/log dir for logging

This patch is using the qa/log directory to store the output
of the check. In case of success, the directory is deleted.
In case of failure, the directory remains in place.

This should fixes #910.

12 years agoaf-packet: add sanity check in free function
Eric Leblond [Mon, 29 Jul 2013 12:58:07 +0000 (14:58 +0200)] 
af-packet: add sanity check in free function

12 years agoSuppress Suri prefix. 467/head
Eric Leblond [Tue, 16 Jul 2013 14:50:45 +0000 (16:50 +0200)] 
Suppress Suri prefix.

12 years agosuricata: function for lowercase table creation
Eric Leblond [Fri, 10 May 2013 07:53:20 +0000 (09:53 +0200)] 
suricata: function for lowercase table creation

12 years agoSimplify code by removing comment
Eric Leblond [Tue, 9 Apr 2013 13:22:13 +0000 (15:22 +0200)] 
Simplify code by removing comment

12 years agosuricata: add wrapper for interface listing
Eric Leblond [Tue, 9 Apr 2013 13:16:01 +0000 (15:16 +0200)] 
suricata: add wrapper for interface listing

12 years agoUse new function GetLogDirectory()
Eric Leblond [Tue, 9 Apr 2013 12:52:02 +0000 (14:52 +0200)] 
Use new function GetLogDirectory()

12 years agoAdd util-conf for config util
Eric Leblond [Tue, 9 Apr 2013 12:41:34 +0000 (14:41 +0200)] 
Add util-conf for config util

12 years agosuricata: add some wrapper for config file handling
Eric Leblond [Tue, 9 Apr 2013 12:25:37 +0000 (14:25 +0200)] 
suricata: add some wrapper for config file handling

12 years agomove unittest out of suricata.c
Eric Leblond [Tue, 9 Apr 2013 10:21:43 +0000 (12:21 +0200)] 
move unittest out of suricata.c

12 years agosuricata: list cuda cards in separate function
Eric Leblond [Tue, 9 Apr 2013 09:34:12 +0000 (11:34 +0200)] 
suricata: list cuda cards in separate function

12 years agosuricata: separate keyword and app layer listing code
Eric Leblond [Tue, 9 Apr 2013 09:05:39 +0000 (11:05 +0200)] 
suricata: separate keyword and app layer listing code

The list-keyword and app-layer listing code was spread over all the
init code. This patch introduces a separate file to store non standard
running mode like these ones.

12 years agorunmodes: fix comment
Eric Leblond [Mon, 8 Apr 2013 10:00:32 +0000 (12:00 +0200)] 
runmodes: fix comment

12 years agoStorage: rename Init to Alloc to reflect actual functioning. Comment updates.
Victor Julien [Mon, 22 Jul 2013 15:33:19 +0000 (17:33 +0200)] 
Storage: rename Init to Alloc to reflect actual functioning. Comment updates.

12 years agoStorage API: add safety check for cases when there is no storage used.
Victor Julien [Tue, 9 Apr 2013 09:11:35 +0000 (11:11 +0200)] 
Storage API: add safety check for cases when there is no storage used.

12 years agoengine-tag: rename var and add sanity check
Eric Leblond [Wed, 20 Mar 2013 13:47:17 +0000 (14:47 +0100)] 
engine-tag: rename var and add sanity check

12 years agoflow tag: conversion to flow storage API
Eric Leblond [Wed, 20 Mar 2013 10:28:58 +0000 (11:28 +0100)] 
flow tag: conversion to flow storage API

This patch is updating the flow tag system to use the flow
storage API. The tag_list member of Flow structure is suppressed
and its cleaning operation are suppressed too as this is handled
transparently by the flow storage API.

12 years agoAdd per-flow generic storage
Eric Leblond [Fri, 15 Mar 2013 14:25:46 +0000 (15:25 +0100)] 
Add per-flow generic storage

This patch adds a per-flow storage that can be created via the functions
available in flow-storage.c.

12 years agoHost: use global free storage function
Eric Leblond [Mon, 18 Mar 2013 10:05:52 +0000 (11:05 +0100)] 
Host: use global free storage function

This patch is here to avoid that all modules using a local storage
have to update host code to add their free function. It modifies
previous behavior by calling HostFreeStorage in any case.

12 years agoUse Host Storage API for per host thresholding
Victor Julien [Thu, 14 Mar 2013 16:08:14 +0000 (17:08 +0100)] 
Use Host Storage API for per host thresholding

12 years agoInit storage api at start up
Victor Julien [Thu, 14 Mar 2013 16:06:09 +0000 (17:06 +0100)] 
Init storage api at start up

12 years agoStorage API: add registration check closed test in debug mode.
Victor Julien [Thu, 14 Mar 2013 10:59:38 +0000 (11:59 +0100)] 
Storage API: add registration check closed test in debug mode.

12 years agoMove Host Tag storage to Host Storage API.
Victor Julien [Wed, 13 Mar 2013 22:38:39 +0000 (23:38 +0100)] 
Move Host Tag storage to Host Storage API.

12 years agoAdd Host specific wrapper to StorageRegister()
Victor Julien [Fri, 1 Mar 2013 13:46:47 +0000 (14:46 +0100)] 
Add Host specific wrapper to StorageRegister()

12 years agostorage: allow preallocated storage
Victor Julien [Fri, 25 Jan 2013 13:28:41 +0000 (14:28 +0100)] 
storage: allow preallocated storage

12 years agohost: use storage api
Victor Julien [Tue, 22 Jan 2013 17:01:58 +0000 (18:01 +0100)] 
host: use storage api

12 years agoInitial storage api work
Victor Julien [Fri, 18 Jan 2013 14:50:25 +0000 (15:50 +0100)] 
Initial storage api work

12 years agoMisc fixes after make check feedback
Victor Julien [Sun, 28 Jul 2013 10:59:52 +0000 (12:59 +0200)] 
Misc fixes after make check feedback

12 years agoAdd TILE-Gx mPIPE packet processing support. 465/head
Ken Steele [Fri, 26 Jul 2013 17:22:19 +0000 (13:22 -0400)] 
Add TILE-Gx mPIPE packet processing support.

The TILE-Gx processor includes a packet processing engine, called
mPIPE, that can deliver packets directly into user space memory. It
handles buffer allocation and load balancing (either static 5-tuple
hashing, or dynamic flow affinity hashing are used here). The new
packet source code is in source-mpipe.c and source-mpipe.h

A new Tile runmode is added that configures the Suricata pipelines in
worker mode, where each thread does the entire packet processing
pipeline.  It scales across all the Gx chips sizes of 9, 16, 36 or 72
cores. The new runmode is in runmode-tile.c and runmode-tile.h

The configure script detects the TILE-Gx architecture and defines
HAVE_MPIPE, which is then used to conditionally enable the code to
support mPIPE packet processing. Suricata runs on TILE-Gx even without
mPIPE support enabled.

The Suricata Packet structures are allocated by the mPIPE hardware by
allocating the Suricata Packet structure immediatley before the mPIPE
packet buffer and then pushing the mPIPE packet buffer pointer onto
the mPIPE buffer stack.  This way, mPIPE writes the packet data into
the buffer, returns the mPIPE packet buffer pointer, which is then
converted into a Suricata Packet pointer for processing inside
Suricata. When the Packet is freed, the buffer is returned to mPIPE's
buffer stack, by setting ReleasePacket to an mPIPE release specific
function.

The code checks for the largest Huge page available in Linux when
Suricata is started. TILE-Gx supports Huge pages sizes of 16MB, 64MB,
256MB, 1GB and 4GB. Suricata then divides one of those page into
packet buffers for mPIPE.

The code is not yet optimized for high performance. Performance
improvements will follow shortly.

The code was originally written by Tom Decanio and then further
modified by Tilera.

This code has been tested with Tilera's Multicore Developement
Environment (MDE) version 4.1.5. The TILEncore-Gx36 (PCIe card) and
TILEmpower-Gx (1U Rack mount).

12 years agoipv6: fix parsing of malformed ext hdr. Bug #908.
Victor Julien [Fri, 26 Jul 2013 10:04:14 +0000 (12:04 +0200)] 
ipv6: fix parsing of malformed ext hdr. Bug #908.

12 years agoicmpv6: fix icmp_id and icmp_seq keywords
Victor Julien [Fri, 26 Jul 2013 07:31:06 +0000 (09:31 +0200)] 
icmpv6: fix icmp_id and icmp_seq keywords

Bug #907

12 years agoFix compiler warning due to missing include
Victor Julien [Wed, 24 Jul 2013 10:35:38 +0000 (12:35 +0200)] 
Fix compiler warning due to missing include

decode.c: In function 'DecodeThreadVarsAlloc':
decode.c:437: error: implicit declaration of function 'ConfGetBool'

12 years agovlan: add rule for new 'too many layers' event 460/head
Victor Julien [Wed, 24 Jul 2013 09:54:08 +0000 (11:54 +0200)] 
vlan: add rule for new 'too many layers' event

12 years agoAdd yaml option to disable vlan ids hashing
Victor Julien [Tue, 23 Jul 2013 11:23:08 +0000 (13:23 +0200)] 
Add yaml option to disable vlan ids hashing

In some cases using the vlan id(s) in flow hashing is problematic. Cases
of broken routers have been reported. So this option allows for disabling
the use of vlan id(s) while calculating the flow hash, and in the future
other hashes.

Vlan tracking for flow is enabled by default.

12 years agoflow: take vlan_id's into account in the flow hash
Victor Julien [Thu, 11 Oct 2012 18:35:17 +0000 (20:35 +0200)] 
flow: take vlan_id's into account in the flow hash

In VLAN we can have 2 layers of encapsulation. In this patch both
layers are used in the flow hash to distinguish between encapsulated
traffic.

12 years agoRemove obsolete code: flow alert sid storage
Victor Julien [Sat, 20 Jul 2013 10:24:17 +0000 (12:24 +0200)] 
Remove obsolete code: flow alert sid storage

12 years agoAdd --unittests-coverage option to list how many code modules have tests
Victor Julien [Sat, 20 Jul 2013 10:05:14 +0000 (12:05 +0200)] 
Add --unittests-coverage option to list how many code modules have tests

12 years agoRename GetIfaceMaxPayloadSize to GetIfaceMaxPacketSize to reflect the actual function.
Victor Julien [Thu, 25 Apr 2013 16:37:33 +0000 (18:37 +0200)] 
Rename GetIfaceMaxPayloadSize to GetIfaceMaxPacketSize to reflect the actual function.

12 years agoPcap: fix snaplen autodetection, GetIfaceMTU doesn't include link layer length
Victor Julien [Thu, 25 Apr 2013 16:34:42 +0000 (18:34 +0200)] 
Pcap: fix snaplen autodetection, GetIfaceMTU doesn't include link layer length

12 years agoFix typo in configure.ac echo message
Ken Steele [Fri, 19 Jul 2013 17:04:58 +0000 (13:04 -0400)] 
Fix typo in configure.ac echo message

12 years agofix bug where we were not printing http hostname(printing <unknown> 452/head
Anoop Saldanha [Fri, 19 Jul 2013 16:29:53 +0000 (21:59 +0530)] 
fix bug where we were not printing http hostname(printing <unknown>
previously) in httplog, filestore meta and file log.

12 years agoNFQ: fix packets not getting freed
Victor Julien [Fri, 19 Jul 2013 13:27:41 +0000 (15:27 +0200)] 
NFQ: fix packets not getting freed

12 years agofix for #882.
Anoop Saldanha [Thu, 18 Jul 2013 09:05:54 +0000 (14:35 +0530)] 
fix for #882.

Refactor the code that initializes the cuda mpm environment.

12 years agoNFQ: adapt to ReleasePacket API
Victor Julien [Fri, 19 Jul 2013 10:33:34 +0000 (12:33 +0200)] 
NFQ: adapt to ReleasePacket API

12 years agoReplace ReleaseData function on Packet Structure with ReleasePacket.
Ken Steele [Wed, 10 Jul 2013 20:47:52 +0000 (16:47 -0400)] 
Replace ReleaseData function on Packet Structure with ReleasePacket.

This commit allows handling Packets allocated by different methods.
The ReleaseData function pointer in the Packet structure is replaced
with ReleasePacket function pointer, which is then always called to
release the memory associated with a Packet.

Currently, the only usage of ReleaseData is in AF Packet. Previously
ReleaseData was only called when it was not NULL. To implement the
same functionality as before in AF Packet, a new function is defined
in AF Packet to first call the AFP specific ReleaseData function and
then releases the Packet structure.

Three new general functions are defined for releasing packets in the
default case:
    1) PacketFree() - To release a packet alloced with SCMalloc()
    2) PacketPoolReturnPacket() - For packets allocated from the Packet Pool.
                                  Calls RECYCLE_PACKET(p)
    3) PacketFreeOrRelease() - Calls PacketFree() or PacketPoolReturnPacket()
                                 based on the PKT_ALLOC flag.

Having these functions removes the need to check the PKT_ALLOC flag
when releasing a packet in most cases, since the ReleasePacket
function encodes how the Packet was allocated. The PKT_ALLOC flag is
still set and is needed when AF Packet releases a packet, since it
replaces the ReleasePacket function pointer with its own function and
then calls PacketFreeOfRelease(), which uses the PKT_ALLOC flag.

12 years agoUpdate changelog for 2.0beta1 suricata-2.0beta1
Victor Julien [Thu, 18 Jul 2013 13:30:25 +0000 (15:30 +0200)] 
Update changelog for 2.0beta1

12 years agofix for #875.
Anoop Saldanha [Wed, 17 Jul 2013 18:54:29 +0000 (00:24 +0530)] 
fix for #875.

Update configure.ac to check for either 0.5.5 and 0.5.x version of libhtp.

12 years agoCode to enable cuda support for pfring live mode. 450/head
Anoop Saldanha [Thu, 18 Jul 2013 10:21:50 +0000 (15:51 +0530)] 
Code to enable cuda support for pfring live mode.

12 years agoDNS: break out of DNSResponseGetNameByOffset if we're in there too long. Can happen...
Victor Julien [Thu, 18 Jul 2013 07:54:09 +0000 (09:54 +0200)] 
DNS: break out of DNSResponseGetNameByOffset if we're in there too long. Can happen on bad data.

12 years agoStream: don't inject stream end pseudo pkt on FinWait2 state. Bug #883.
Victor Julien [Thu, 18 Jul 2013 06:02:08 +0000 (08:02 +0200)] 
Stream: don't inject stream end pseudo pkt on FinWait2 state. Bug #883.

12 years agoDNS: convert info logs to debugs
Victor Julien [Thu, 18 Jul 2013 05:10:07 +0000 (07:10 +0200)] 
DNS: convert info logs to debugs