Commit Graph

4473 Commits (a7a77e32cac298a64c6c2ea5d30d4dc37ef3f5bc)
 

Author SHA1 Message Date
Victor Julien 7edcc13514 NFQ: fix packets not getting freed 11 years ago
Anoop Saldanha cdaa13012a fix for #882.
Refactor the code that initializes the cuda mpm environment.
11 years ago
Victor Julien 9f3e2f7a92 NFQ: adapt to ReleasePacket API 11 years ago
Ken Steele b076a26cdc 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.
11 years ago
Victor Julien f09f289b34 Update changelog for 2.0beta1 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
Anoop Saldanha 9698a5d78c Code to enable cuda support for pfring live mode. 11 years ago
Victor Julien 91fb47475b DNS: break out of DNSResponseGetNameByOffset if we're in there too long. Can happen on bad data. 11 years ago
Victor Julien aa26dae5a1 Stream: don't inject stream end pseudo pkt on FinWait2 state. Bug #883. 11 years ago
Victor Julien 2f3f577fb6 DNS: convert info logs to debugs 11 years ago
Victor Julien 97f51c1011 Fix ac-bs and ac-gfbs mpm-algo settings leading to fatal error if CUDA is enabled. Workaround for #882. 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 50ac3e0498 autotools: workaround on partial cleaning 11 years ago
Eric Leblond 0cef0b8808 configure: minor cleaning 11 years ago
Eric Leblond e2334fbfe8 unix socket: fix typo in error message 11 years ago
Eric Leblond 7dbc97b01c autotools: AM_INIT_AUTOMAKE with args is deprecated 11 years ago
Eric Leblond c2cbb43776 autotool: INCLUDES usage is deprecated 11 years ago
Eric Leblond 281d2f27f8 Fix compilation warning
A goto could lead to the use de_ctx without declaring it.
11 years ago
Eric Leblond 915aa9fc26 Add file needed for some autotools version.
It seems config.rpath is a file needed in some cases. If the
file is not present libhtp autogen.sh is failling.
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 f4dcba6de3 In case of fragments, don't consider ports. Bug #847. 11 years ago
Anoop Saldanha e7f09f24c8 Code to enable cuda support for live mode pcap and af-packet. Keep an eye
out on the mailing list and http://planet.suricata-ids.org for performance
and other profiling data.
11 years ago
Victor Julien 51d6c63860 Luajit: fix compilation and tests after libhtp upgrade 11 years ago
Victor Julien fdc3b5ba15 Fix CLS configure check 11 years ago
Victor Julien 3599e22e4c libhtp: remove libhtp from repo 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 080c15b3fc Enable libhtp 0.3.0 compilation and crash free UT run. Still see 5 failed tests. 11 years ago
Victor Julien 538da26812 Fix sgh mpm flags assignment 11 years ago
Eric Leblond 150cd39c6e detect-engine: do a direct update of flag
There is no reason not to update the flag directly. So do it
to avoid to crash the test.
11 years ago
Eric Leblond 9212ff7e59 coccinelle: dynamic testing through make check
This patch modify build system to have make to create the
struct-flags.cocci file by running struct-flags.py.

This way 'make check' is running the test defined from source
code.
11 years ago
Eric Leblond e05fd7f1d0 coccinelle: add script to generate flags test
This patch adds a script which can be used to generate a test
on coherence of flag usage.

By adding comment in the code, it is possible to declare that we
link a flag in a structure to a specific family of constant:

For example:
	/* coccinelle: Packet:flowflags:FLOW_PKT_ */
will trigger the generation on a test which verifies that the
flowflags field in Packet structure is only used with constant
starting by FLOW_PKT_.
11 years ago
Eric Leblond 2f2916d9ec ccccinelle: add formatted comment for flag test 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 73e27c1fb7 Generate proper errors if sid,gid,rev values are out of range. Bug #779. 11 years ago
Victor Julien 164d60e8cd Yaml: give a more detailed error if the user supplies a directory instead of a yaml file. Bug #803. 11 years ago
Victor Julien 55625d738a TLS: create certs dir on 'make install-full'. Bug #711. 11 years ago
Victor Julien a4e838c1d3 TLS: create certs directory during startup if it doesn't exist yet. Bug #710. 11 years ago
Victor Julien 2b5d586dbc TLS: add missing options to shipped yaml. Bug #709. 11 years ago
Victor Julien 6229bfab5e DNS: rename dns.rules to dns-events.rules, include it in yaml 11 years ago
Eric Leblond 0e92469222 nfq: be sure to always verdict packets
To be sure to always verdict packets (bug #769), this patch adds
a ReleaseData function to NFQ packets. The release function simply
drop the packet if it has not been verdicted before.
11 years ago
Victor Julien 4a0050b9ea Print pkt src to alert-debug log 11 years ago
Victor Julien 1c371da46d DNS: better handle TX' with lost replies 11 years ago
Victor Julien 0fd9b0c4fa HTP: free TX from transaction free API call 11 years ago
Victor Julien 1367074c75 App layer: clean up TX before lowest active one
Update DNS to handle cleaning up this way.
11 years ago
Victor Julien 0b229ec8b9 DNS: suppress log-dns registration message 11 years ago
Victor Julien f59f90331d Applayer: remove obsolete StateUpdateTransactionId
Also, update StateTransactionFree to take an u64 tx id, so it's
consistant with the rest of the engine.

To reflect these changes, AppLayerRegisterTransactionIdFuncs has
been renamed to AppLayerRegisterTxFreeFunc.

HTP, DNS, SMB, DCERPC parsers updated.
11 years ago
Victor Julien ebab9aee83 DNS: move internal tx id tracking to u64 11 years ago