]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
11 years agodefrag: don't modify packet if defrag fails 666/head
Eric Leblond [Thu, 28 Nov 2013 16:36:03 +0000 (17:36 +0100)] 
defrag: don't modify packet if defrag fails

If defrag fails dur to an invalid decoding, we are not modifying
the origin packet anymore.

11 years agodecode: PacketTunnelPktSetup replaces PacketPseudoPktSetup
Eric Leblond [Thu, 28 Nov 2013 14:23:21 +0000 (15:23 +0100)] 
decode: PacketTunnelPktSetup replaces PacketPseudoPktSetup

This patch replaces PacketPseudoPktSetup by a better named
PacketTunnelPktSetup function which is also in charge of doing
the decoding of the tunneled packet.
This allow to clean the code. But it also fixes an issue.
Previously, if the DecodeTunnel function was failling (cause of
an invalid packet mainly), the result was that the original packet
to be considered as a tunnel packet (and not inspected by payload
detection).

11 years agodecode: update API to return error
Eric Leblond [Wed, 27 Nov 2013 17:53:52 +0000 (18:53 +0100)] 
decode: update API to return error

In some cases, the decoding is not possible and some really invalid
packet can be created. This is in particular the case of tunnel. In
that case, it is more interesting to forget about the tunneled
packet and only consider the original packet.

DecodeTunnel function is maked as warn_unused_result because it is
meaningful for the decoder to know if the underlying data were not
correct. And in this case, only focus detection on the content.

11 years agorule setup: cleanup
Victor Julien [Thu, 28 Nov 2013 14:07:33 +0000 (15:07 +0100)] 
rule setup: cleanup

Remove rule preparation logic that ran, but it's results were not
used.

11 years agoConvert dsize keyword parsing to use pcre_copy_substring
Victor Julien [Thu, 28 Nov 2013 12:30:04 +0000 (13:30 +0100)] 
Convert dsize keyword parsing to use pcre_copy_substring

11 years agoConvert pcre keyword parsing to use pcre_copy_substring
Victor Julien [Thu, 28 Nov 2013 11:59:10 +0000 (12:59 +0100)] 
Convert pcre keyword parsing to use pcre_copy_substring

11 years agorule parser: convert to use pcre_copy_string
Victor Julien [Thu, 28 Nov 2013 08:44:10 +0000 (09:44 +0100)] 
rule parser: convert to use pcre_copy_string

11 years agodetect: use macro for max rule size
Victor Julien [Thu, 28 Nov 2013 08:20:55 +0000 (09:20 +0100)] 
detect: use macro for max rule size

11 years agoConvert flowbits keyword parsing to use pcre_copy_substring
Victor Julien [Wed, 27 Nov 2013 22:56:32 +0000 (23:56 +0100)] 
Convert flowbits keyword parsing to use pcre_copy_substring

11 years agoConvert flow keyword parsing to use pcre_copy_substring
Victor Julien [Wed, 27 Nov 2013 20:23:25 +0000 (21:23 +0100)] 
Convert flow keyword parsing to use pcre_copy_substring

11 years agoConvert ParseSizeString to use pcre_copy_substring
Victor Julien [Wed, 27 Nov 2013 20:15:48 +0000 (21:15 +0100)] 
Convert ParseSizeString to use pcre_copy_substring

11 years agorule parser: don't use uninitialized value
Victor Julien [Wed, 27 Nov 2013 19:28:28 +0000 (20:28 +0100)] 
rule parser: don't use uninitialized value

11 years agofeature #417: add support for configuration per host timeout value
Giuseppe Longo [Sat, 12 Oct 2013 10:02:49 +0000 (12:02 +0200)] 
feature #417: add support for configuration per host timeout value

11 years agorule parsing cleanups
Victor Julien [Wed, 27 Nov 2013 17:42:29 +0000 (18:42 +0100)] 
rule parsing cleanups

Clean up usage of array of pointers to the various parts of a rule.

11 years agorule parsing: reduce mallocs and clean up
Victor Julien [Wed, 27 Nov 2013 17:19:52 +0000 (18:19 +0100)] 
rule parsing: reduce mallocs and clean up

Reduce mallocs during rule parsing. Also, no longer recursively
call the option parse function.

11 years agoaddress and port: reduce memory allocs
Victor Julien [Wed, 27 Nov 2013 15:28:37 +0000 (16:28 +0100)] 
address and port: reduce memory allocs

11 years agoRemove the single line if statements.
Jason Ish [Tue, 26 Nov 2013 16:16:04 +0000 (10:16 -0600)] 
Remove the single line if statements.

11 years agoSupport for configuration include files.
Jason Ish [Mon, 28 Oct 2013 19:32:05 +0000 (13:32 -0600)] 
Support for configuration include files.

11 years agosignature address parsing improvements and tests 660/head
Victor Julien [Wed, 27 Nov 2013 10:43:52 +0000 (11:43 +0100)] 
signature address parsing improvements and tests

Fix sigatures not supporting [10.0.0.0/24, !10.1.1.1] notation when
used directly in a rule instead of through a variable.

Add tests for Bugs #815 and #920.

11 years agovalgrind: add suppression file
Victor Julien [Tue, 26 Nov 2013 16:15:41 +0000 (17:15 +0100)] 
valgrind: add suppression file

11 years agohttp: use body limit in inspection
Victor Julien [Tue, 26 Nov 2013 13:05:53 +0000 (14:05 +0100)] 
http: use body limit in inspection

When inspecting HTTP bodies there are several limits involved.
In this patch the reaching of the body limit will trigger body
inspection.

Without this, the body would only be inspected when inspection
limits "request-body-minimal-inspect-size" or
"response-body-minimal-inspect-size" were reached. If the body
limit was smaller than this value, the body would only be
inspected at the end of the tx or stream.

11 years agoFix using uninitialized memory (Bug #994)
Victor Julien [Mon, 25 Nov 2013 18:38:14 +0000 (19:38 +0100)] 
Fix using uninitialized memory (Bug #994)

11 years agoutil-ioctl: ioctl error should be a warning 657/head
Eric Leblond [Thu, 21 Nov 2013 10:19:17 +0000 (11:19 +0100)] 
util-ioctl: ioctl error should be a warning

11 years agopcap: add warning about GRO and LRO usage
Eric Leblond [Wed, 20 Nov 2013 10:47:28 +0000 (11:47 +0100)] 
pcap: add warning about GRO and LRO usage

Use the new GetIfaceOffloading function to display a warning message
if pcap capture is used on Linux with GRO or LRO activated. This is
helpful for kernel after 2.6.31 were pcap will use mmaped capture.
TPACKET_V2 is used and this limit the size of the packet resulting
in truncated packets when merged packets are received.

11 years agoaf-packet: add warning message if LRO or GRO are set
Eric Leblond [Tue, 19 Nov 2013 15:10:38 +0000 (16:10 +0100)] 
af-packet: add warning message if LRO or GRO are set

This patch query the network interface to detect if LRO or GRO are
used in mmap TPACKET_V2 mode.

11 years agoutil-ioctl: add GRO/LRO detection capabilities
Eric Leblond [Tue, 19 Nov 2013 14:59:17 +0000 (15:59 +0100)] 
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 agoutil-ioctl: minor code cleaning.
Eric Leblond [Tue, 19 Nov 2013 10:26:54 +0000 (11:26 +0100)] 
util-ioctl: minor code cleaning.

Fix author e-mail and simplify an indentation.

11 years agopfring: improve error reporting at device opening
Eric Leblond [Tue, 19 Nov 2013 10:06:50 +0000 (11:06 +0100)] 
pfring: improve error reporting at device opening

This patch improves the error message displayed if pfring_open fails.

11 years agodetect: don't consider smsgs for no inspect flag
Victor Julien [Fri, 22 Nov 2013 17:11:10 +0000 (18:11 +0100)] 
detect: don't consider smsgs for no inspect flag

When the PKT_NOPAYLOAD_INSPECTION flag is set, don't apply it to smsgs.
This way we can still inspect the outstanding smsgs.

The PKT_NOPAYLOAD_INSPECTION is set for encrypted traffic, and is combined
with disabling stream reassembly. So we only inspect the smsgs up to the
point of the disable detection point.

11 years agostream: improve raw reassembly
Victor Julien [Fri, 22 Nov 2013 17:00:54 +0000 (18:00 +0100)] 
stream: improve raw reassembly

When checking the reassembly limit for raw reassembly, consider the
STREAMTCP_STREAM_FLAG_NOREASSEMBLY a trigger immediately. We won't
process any more segments in the reassembly engine anyway.

11 years agoFix autofp flow queue handler optimization
Victor Julien [Thu, 21 Nov 2013 14:14:30 +0000 (15:14 +0100)] 
Fix autofp flow queue handler optimization

11 years agobuild-info: add a nicer way of printing atomics support 650/head
Victor Julien [Wed, 20 Nov 2013 16:22:32 +0000 (17:22 +0100)] 
build-info: add a nicer way of printing atomics support

11 years agoflow: aligned flow balance structures (used by autofp) to CLS to reduce false sharing
Victor Julien [Thu, 21 Nov 2013 10:34:40 +0000 (11:34 +0100)] 
flow: aligned flow balance structures (used by autofp) to CLS to reduce false sharing

11 years agohttp: add meta-field-limit option 649/head
Victor Julien [Thu, 21 Nov 2013 12:22:52 +0000 (13:22 +0100)] 
http: add meta-field-limit option

The meta-field-option allows for setting the hard limit of request
and response fields in HTTP. In requests this applies to the request
line and headers, not the body. In responses, this applies to the
response line and headers, not the body.

Libhtp uses a default limit of 18k. If this is reached an event is
raised.

Ticket 986.

11 years agoSSE 4.2 memcmp: don't read beyond var boundary 644/head
Victor Julien [Wed, 20 Nov 2013 10:57:26 +0000 (11:57 +0100)] 
SSE 4.2 memcmp: don't read beyond var boundary

In the SSE 4.2 SCMemcmpLowercase implementation, there would be a
_mm_load_si128 of a 2 byte array. However, _mm_load_si128 loads
16 bytes, causing it to read beyond the var. I don't think this lead
to crashes, as it was a static var, but clangs ASAN complained about
it.

11 years agoReduce the size of Packet structure
Ken Steele [Tue, 19 Nov 2013 14:53:21 +0000 (09:53 -0500)] 
Reduce the size of Packet structure

Share memory space for IPV4Vars and (IPV6Vars, IPV6ExtHdrs), since a
packet can only be either IPv4 or IPv6, but not both.

Share memory for TCPVars, UDPVars, ICMPV4Vars and ICMPV6Vars, since a
packet can only be only of these.

Then move other structure members around to remove holes reported by pahole.

This reduces the size of the Packet structure from 2944 bytes (46 cachelines)
down to 1976 (31 cachelines), a 33% reduction.

11 years agohttp: strip 'proxy' part of http_uri 640/head
Victor Julien [Tue, 19 Nov 2013 14:26:36 +0000 (15:26 +0100)] 
http: strip 'proxy' part of http_uri

Strip the 'proxy' parts from the normalized uri as inspected by http_uri,
urilen, pcre /U and others.

  In a request line like:
    GET http://suricata-ids.org/blah/ HTTP/1.1
  the normalized URI will now be:
    /blah/

This doesn't affect http_raw_uri. So matching the hostname, etc is still
possible through this keyword.

Additionally, a new per HTTP 'personality' option was added to change
this behavior: "uri-include-all":

  uri-include-all: <true|false>
    Include all parts of the URI. By default the
    'scheme', username/password, hostname and port
    are excluded. Setting this option to true adds
    all of them to the normalized uri as inspected
    by http_uri, urilen, pcre with /U and the other
    keywords that inspect the normalized uri.
    Note that this does not affect http_raw_uri.

So adding uri-include-all:true to all personalities in the yaml will
restore the old default behavior.

Ticket 1008.

11 years agoAllocate mPIPE packet ingress queue in each worker thread.
Ken Steele [Tue, 12 Nov 2013 20:47:56 +0000 (15:47 -0500)] 
Allocate mPIPE packet ingress queue in each worker thread.

Move the allocation of the mPipe ingress queue from a loop over
the number of workers in the main init function to being done inside
each worker thread. This allows allocating the memory locally on the
worker's CPU without needing to figure out ahead of time where that thread
will be running. This fixes one case of static mapping of workers to CPUs.

Use __thread to hold the queue rather than a global tables of queues.

11 years agoCleanup Tile build for -Werror
Ken Steele [Mon, 18 Nov 2013 18:28:17 +0000 (13:28 -0500)] 
Cleanup Tile build for -Werror

Just the changes needed for the Tile architecture to compile cleanly with
-Werror.

11 years agoRename checksums to level3_comp_csum and level4_comp_csum.
Ken Steele [Mon, 18 Nov 2013 22:02:50 +0000 (17:02 -0500)] 
Rename checksums to level3_comp_csum and level4_comp_csum.

This will also sharing even more memory in the Packet_ structure.

11 years agosuricata: move some code into PostConfLoadedSetup
Eric Leblond [Mon, 18 Nov 2013 17:12:36 +0000 (18:12 +0100)] 
suricata: move some code into PostConfLoadedSetup

All functions before daemonization are initialisation functions and thus the
call can be moved in PostConfLoadedSetup.

11 years agoRemove mkinstalldirs (bug #1041) 639/head
Victor Julien [Tue, 19 Nov 2013 10:21:47 +0000 (11:21 +0100)] 
Remove mkinstalldirs (bug #1041)

11 years agoAdd SSE support to --build-info 638/head
Victor Julien [Thu, 14 Nov 2013 12:17:18 +0000 (13:17 +0100)] 
Add SSE support to --build-info

11 years agomemcmp: don't use SSE intrinsics if less that 16 bytes are available in SSE_4_2 version.
Victor Julien [Thu, 14 Nov 2013 11:51:06 +0000 (12:51 +0100)] 
memcmp: don't use SSE intrinsics if less that 16 bytes are available in SSE_4_2 version.

11 years agoprofiling: don't init rule profiling ctx if rule profiling is disabled
Victor Julien [Tue, 19 Nov 2013 09:09:44 +0000 (10:09 +0100)] 
profiling: don't init rule profiling ctx if rule profiling is disabled

11 years agoprofiling: when config is missing, keyword profiling is disabled
Victor Julien [Tue, 19 Nov 2013 09:05:02 +0000 (10:05 +0100)] 
profiling: when config is missing, keyword profiling is disabled

11 years agopcap: register counters for old pcap versions as well
Victor Julien [Tue, 19 Nov 2013 08:56:32 +0000 (09:56 +0100)] 
pcap: register counters for old pcap versions as well

11 years agoFix pcre_study error check
Victor Julien [Tue, 19 Nov 2013 08:37:16 +0000 (09:37 +0100)] 
Fix pcre_study error check

pcre_study returning NULL is not necessarily an error, from the man page
pcre_study(3):

  "If the function returns NULL, either it could not find any additional
   information, or there was an error. You can tell the difference by
   looking at the error value. It is NULL in first case."

Older libpcre versions would return NULL, causing errors.

11 years agoShare Packet checksum values for TCP, UDP, IPv6. ICMPv4 and ICMPv6
Ken Steele [Thu, 14 Nov 2013 18:20:10 +0000 (13:20 -0500)] 
Share Packet checksum values for TCP, UDP, IPv6. ICMPv4 and ICMPv6

Keep a separate checksum for IPV4, since a packet can have both an IPV4
checksum and a TCPV4 checksum, or IPV4 and UDPV4 checksum.

This will allow future sharing of more values.

Use PACKET_RESET_CHECKSUMS() in Unit Tests in place of setting the
individual checksum values.

11 years agoAdd missing case for DNS_CONFIG 630/head
Ken Steele [Sat, 16 Nov 2013 02:17:34 +0000 (21:17 -0500)] 
Add missing case for DNS_CONFIG

Found compiling with -Werror

11 years agohttp & tls: fix transaction handling
Victor Julien [Thu, 14 Nov 2013 14:57:04 +0000 (15:57 +0100)] 
http & tls: fix transaction handling

When http and/or tls logging is disabled, the app layer would still
be flagged as logging. This caused transactions not to be freed until
the end of the flow as the logged tx id would never increment.

This fix postpones the setting of the app layer parser "logger"
flag to the point where we know the logger is enabled.

11 years agodns: fix transaction handling
Victor Julien [Thu, 14 Nov 2013 14:44:35 +0000 (15:44 +0100)] 
dns: fix transaction handling

When logging is disabled, the app layer would still be flagged
as logging. This caused transactions not to be freed until the
end of the flow as the logged tx id would never increment.

This fix postpones the setting of the app layer parser "logger"
flag to the point where we know the logger is enabled.

11 years agoDNS: trigger logging for toserver dir when previous reply is lost.
Victor Julien [Mon, 11 Nov 2013 16:27:56 +0000 (17:27 +0100)] 
DNS: trigger logging for toserver dir when previous reply is lost.

11 years agodns: detect case of request flooding
Victor Julien [Thu, 7 Nov 2013 21:55:15 +0000 (22:55 +0100)] 
dns: detect case of request flooding

In the case where DNS requests are sent over the same flow w/o a
reply being received, we now set an event in the flow and refuse
to add more transactions to the state. This protects the DNS
handling from getting overloaded slowing down everything.

A new option to configure this behaviour was added:

app-layer:
  protocols:
    dnsudp:
       enabled: yes
       detection-ports:
         udp:
           toserver: 53
       request-flood: 750

The request-flood parameter can be 0 (disabling this feature) or a
positive integer. It defaults to 500.

This means that if 500 unreplied requests are seen in a row an event
is set. Rule 2240007 was added to dns-events.rules to match on this.

11 years agoFormatting and comment updates in flow files 628/head
Ken Steele [Fri, 15 Nov 2013 13:55:39 +0000 (08:55 -0500)] 
Formatting and comment updates in flow files

Some reformatting to meet coding standards.

Added a few comments to make it more clear where p->flow gets set.

11 years agodetect: only inspect smsg for valid tcp packets
Victor Julien [Wed, 13 Nov 2013 17:18:19 +0000 (18:18 +0100)] 
detect: only inspect smsg for valid tcp packets

Packets that are rejected by the stream engine are not considered
part of an established tcp session. By allowing them to inspect
an smsg, some smsgs would not be properly inspected.

11 years agoAdd Unit test to check TCPv4 and IPV4 checksums together. 626/head
Ken Steele [Thu, 14 Nov 2013 17:11:09 +0000 (12:11 -0500)] 
Add Unit test to check TCPv4 and IPV4 checksums together.

Copied SigTest26TCPV4Keyword and added check for invalid IPV4 checksums.
Created new SigTest26TCPV4AndIPV4Keyword test with a new packet with valid
IPV4 checksums.

11 years agostream: fix sequence number on smsg
Victor Julien [Tue, 12 Nov 2013 15:37:09 +0000 (16:37 +0100)] 
stream: fix sequence number on smsg

When multiple segments were put into a smsg, the seq would be updated
each time a segment was added. Because of this, the seq wasn't pointing
to the start of the data.

This caused some false negatives when the fast_pattern was in the raw
stream, but another part of the inspection was in the state. Because of
the wrong seq, the inspection of the smsg could be delayed. This in turn,
could make the inspection engine consider a TX inspected, even if it wasn't
fully yet.

11 years agoGive Suricata priority to receive packets over Linux with mPIPE.
Ken Steele [Mon, 11 Nov 2013 20:54:47 +0000 (15:54 -0500)] 
Give Suricata priority to receive packets over Linux with mPIPE.

When installing the rules to tell mPIPE to send packet to Suricata,
give it a higher priority than the default used by Linux. This way if
Linux also tells mPIPE to send it packets, Suricata will get them
instead, as long as Suricata is running.

11 years agohttp: don't decode + to space by default 620/head
Victor Julien [Tue, 12 Nov 2013 09:25:19 +0000 (10:25 +0100)] 
http: don't decode + to space by default

Libhtp decodes the + character in the query string to a space by default.
Suricata rules (e.g. etpro sid 2806767) are expecting to see the space in
the http_uri buffer.

Added an option per htp config to reenable this default behavior:

    query-plusspace-decode: yes

Bug #1035.

11 years agoFix live rule reload confusing delayed detect 616/head
Victor Julien [Mon, 11 Nov 2013 15:11:19 +0000 (16:11 +0100)] 
Fix live rule reload confusing delayed detect

Fixes bug 1023 and the previous attempt to fix it.

11 years agodetect: don't do rule reload during delayed detect 615/head
Victor Julien [Wed, 6 Nov 2013 16:25:06 +0000 (17:25 +0100)] 
detect: don't do rule reload during delayed detect

When both rule reloads and delayed detect are enabled, make sure we don't
trigger a reload during delayed detect initialization.

Bug #1023.

11 years agoprofiling: add tracking of missing keywords
Victor Julien [Thu, 7 Nov 2013 13:40:25 +0000 (14:40 +0100)] 
profiling: add tracking of missing keywords

11 years agoprofiling: per buffer profiling
Victor Julien [Thu, 7 Nov 2013 10:30:17 +0000 (11:30 +0100)] 
profiling: per buffer profiling

11 years agodetect: add tostring function for DETECT_SM_LIST_ enum.
Victor Julien [Thu, 7 Nov 2013 10:53:39 +0000 (11:53 +0100)] 
detect: add tostring function for DETECT_SM_LIST_ enum.

11 years agoprofiling: introduce per keyword profiling 613/head
Victor Julien [Thu, 4 Apr 2013 15:08:59 +0000 (17:08 +0200)] 
profiling: introduce per keyword profiling

Initial version of per keyword profiling. Prints stats about
how ofter a keyword was checked and what the costs were.

11 years agocontent inspection: introduce no_match label
Victor Julien [Mon, 4 Nov 2013 15:46:04 +0000 (16:46 +0100)] 
content inspection: introduce no_match label

11 years agostream: fix IPv6 pseudo packet setup 610/head
Victor Julien [Tue, 5 Nov 2013 15:55:57 +0000 (16:55 +0100)] 
stream: fix IPv6 pseudo packet setup

Bug #1022: IPv6 pseudo packet setup using reverse logic of IPv4.

11 years agostream: reduce scope of StreamTcpPseudoPacketSetupHeader
Victor Julien [Tue, 5 Nov 2013 14:48:05 +0000 (15:48 +0100)] 
stream: reduce scope of StreamTcpPseudoPacketSetupHeader

11 years agoIPv4 decoder compile warning fix
Victor Julien [Tue, 5 Nov 2013 12:25:39 +0000 (13:25 +0100)] 
IPv4 decoder compile warning fix

11 years agoDNS: fix response name length logic 609/head
Victor Julien [Mon, 4 Nov 2013 18:37:32 +0000 (19:37 +0100)] 
DNS: fix response name length logic

In some cases where the length would be calculated as 0 we'd loop until
we'd hit our loop limit.

Update name logic everywhere.

11 years agoFix for #1003.
Anoop Saldanha [Fri, 18 Oct 2013 10:33:16 +0000 (16:03 +0530)] 
Fix for #1003.

Now that we call stream reassembly directly from proto detection, we will
need to check if reassembly has been disabled inside the stream reassembly
callback.

This prevents any calls to bypass and re-enter proto detection, despite
having reassembly disabled.

11 years agoCounters: fix delayed-detect counter registration
Victor Julien [Thu, 31 Oct 2013 10:39:59 +0000 (11:39 +0100)] 
Counters: fix delayed-detect counter registration

Make sure we register the detect.alerts counter before packet runtime starts
even in delayed detect mode. The registration of new counters at packet
runtime is not supported by the counters api and might lead to crashes as there
is no proper locking to allow for this operation.

This changes how delayed detect works a bit. Now we call the ThreadInit
callback twice. The first call will only register the counter. The 2nd call
will do all the other setup. This way the counter is registered before the
counters api starts operating in the packet runtime.

Fixes the segv reported in ticket #1018.

11 years agoCounters: move perf critical var to the top of the SCPerfContext struct
Victor Julien [Thu, 31 Oct 2013 08:31:08 +0000 (09:31 +0100)] 
Counters: move perf critical var to the top of the SCPerfContext struct

11 years agoCounter: fix accidental logic change
Victor Julien [Wed, 30 Oct 2013 18:51:14 +0000 (19:51 +0100)] 
Counter: fix accidental logic change

11 years agoCounters: remove unused updated field
Victor Julien [Wed, 30 Oct 2013 18:42:09 +0000 (19:42 +0100)] 
Counters: remove unused updated field

11 years agoOptimizations to reduce branch misses 607/head
Victor Julien [Wed, 30 Oct 2013 11:22:14 +0000 (12:22 +0100)] 
Optimizations to reduce branch misses

11 years agoCounters: remove unused tm_name comparison loops
Victor Julien [Tue, 29 Oct 2013 08:04:07 +0000 (09:04 +0100)] 
Counters: remove unused tm_name comparison loops

11 years agoCounters: fix unix socket
Victor Julien [Tue, 29 Oct 2013 07:29:11 +0000 (08:29 +0100)] 
Counters: fix unix socket

11 years agoCounters: merge SCPerfCounterName into SCPerfCounter as there was a 1 on 1 mapping
Victor Julien [Tue, 29 Oct 2013 07:19:16 +0000 (08:19 +0100)] 
Counters: merge SCPerfCounterName into SCPerfCounter as there was a 1 on 1 mapping

11 years agoCounters: remove SCPerfCounterValue struct as we no longer support multiple data...
Victor Julien [Tue, 29 Oct 2013 07:00:06 +0000 (08:00 +0100)] 
Counters: remove SCPerfCounterValue struct as we no longer support multiple data types

11 years agoCounters: more unused code removal
Victor Julien [Mon, 28 Oct 2013 23:34:13 +0000 (00:34 +0100)] 
Counters: more unused code removal

11 years agoCounters: remove unused code
Victor Julien [Mon, 28 Oct 2013 23:10:38 +0000 (00:10 +0100)] 
Counters: remove unused code

11 years agoCounters: remove all unused parts of the API
Victor Julien [Mon, 28 Oct 2013 18:00:06 +0000 (19:00 +0100)] 
Counters: remove all unused parts of the API

11 years agoUse unlikely in malloc failure test. 604/head
Eric Leblond [Mon, 28 Oct 2013 10:49:23 +0000 (11:49 +0100)] 
Use unlikely in malloc failure test.

This patch is a result of applying the following coccinelle
transformation to suricata sources:

  @istested@
  identifier x;
  statement S1;
  identifier func =~ "(SCMalloc|SCStrdup|SCCalloc|SCMallocAligned|SCRealloc)";
  @@

  x = func(...)
  ... when != x
  - if (x == NULL) S1
  + if (unlikely(x == NULL)) S1

11 years agoaf-packet: init correctly the config structure 603/head
Eric Leblond [Fri, 25 Oct 2013 21:44:12 +0000 (23:44 +0200)] 
af-packet: init correctly the config structure

This fix a crash when interface is not defined in YAML.

11 years agodecode: fix typo in comment
Eric Leblond [Thu, 24 Oct 2013 07:42:35 +0000 (09:42 +0200)] 
decode: fix typo in comment

11 years agoUpdate ftp parser protocol detection to use lowercase patterns. 600/head
Anoop Saldanha [Mon, 21 Oct 2013 04:22:55 +0000 (09:52 +0530)] 
Update ftp parser protocol detection to use lowercase patterns.

11 years agoIntroduce new API to allow case insensitive protocol detection patterns.
Anoop Saldanha [Sun, 20 Oct 2013 18:00:43 +0000 (23:30 +0530)] 
Introduce new API to allow case insensitive protocol detection patterns.

11 years agoRemove the obsolete DetectFtpBounceMatch() function.
Anoop Saldanha [Sat, 19 Oct 2013 13:00:05 +0000 (18:30 +0530)] 
Remove the obsolete DetectFtpBounceMatch() function.

11 years agoSpell fixes in threads-arch-tile.h
Ken Steele [Fri, 18 Oct 2013 18:21:50 +0000 (14:21 -0400)] 
Spell fixes in threads-arch-tile.h

11 years agoSupport for feature #983.
Anoop Saldanha [Thu, 17 Oct 2013 06:52:43 +0000 (12:22 +0530)] 
Support for feature #983.

Provide support for icmvp4 and icmpv6 as well.  You can now use

alert icmpv4 and
alert icmpv6 as well, apart from the existing

alert icmp, which created a rule that applied to both icmpv4 and icmpv6.

11 years agoBuild cuda kernel for capability 3.5 devices.
Nelson Escobar [Thu, 17 Oct 2013 21:32:47 +0000 (14:32 -0700)] 
Build cuda kernel for capability 3.5 devices.

11 years agoDead code removal
Victor Julien [Fri, 18 Oct 2013 18:12:17 +0000 (20:12 +0200)] 
Dead code removal

11 years agostorage: fix and small optimization
Victor Julien [Fri, 18 Oct 2013 18:09:09 +0000 (20:09 +0200)] 
storage: fix and small optimization

11 years agoflow: set correct family in FLOW_COPY_IPV6_ADDR_TO_PACKET
Victor Julien [Thu, 17 Oct 2013 20:36:29 +0000 (22:36 +0200)] 
flow: set correct family in FLOW_COPY_IPV6_ADDR_TO_PACKET

11 years agoFix 2 unittests
Victor Julien [Thu, 17 Oct 2013 17:07:46 +0000 (19:07 +0200)] 
Fix 2 unittests

11 years agoMinor code cleanup/fixes to fast pattern unittests
Victor Julien [Thu, 17 Oct 2013 15:52:43 +0000 (17:52 +0200)] 
Minor code cleanup/fixes to fast pattern unittests

cppcheck:
[detect-fast-pattern.c:1183] -> [detect-fast-pattern.c:1183]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1217] -> [detect-fast-pattern.c:1217]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1449] -> [detect-fast-pattern.c:1449]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1479] -> [detect-fast-pattern.c:1479]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1509] -> [detect-fast-pattern.c:1509]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1539] -> [detect-fast-pattern.c:1539]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1570] -> [detect-fast-pattern.c:1570]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1686] -> [detect-fast-pattern.c:1686]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1716] -> [detect-fast-pattern.c:1716]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1746] -> [detect-fast-pattern.c:1746]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1776] -> [detect-fast-pattern.c:1776]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1806] -> [detect-fast-pattern.c:1806]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1836] -> [detect-fast-pattern.c:1836]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1866] -> [detect-fast-pattern.c:1866]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1896] -> [detect-fast-pattern.c:1896]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:1926] -> [detect-fast-pattern.c:1926]: (style) Same expression on both sides of '&'.
[detect-fast-pattern.c:2022] -> [detect-fast-pattern.c:2022]: (style) Same expression on both sides of '&'.

11 years agoMinor fix for detection engine setup error check
Victor Julien [Thu, 17 Oct 2013 15:41:52 +0000 (17:41 +0200)] 
Minor fix for detection engine setup error check

cppcheck said:
[detect-engine-mpm.c:2075] -> [detect-engine-mpm.c:2075]: (style) Same expression on both sides of '||'.

11 years agoMinor pppoe cleanup
Victor Julien [Thu, 17 Oct 2013 15:41:03 +0000 (17:41 +0200)] 
Minor pppoe cleanup

cppcheck said:
[decode-pppoe.c:58] -> [decode-pppoe.c:60]: (performance, inconclusive) Variable 'pppoedh' is reassigned a value before the old one has been used if variable is no semaphore variable.