Commit Graph

7011 Commits (920709fe6f14d094dac9513b5c4346657c4effb7)

Author SHA1 Message Date
Victor Julien 71710f088e dns: fix outputs with 0-len A/AAAA records 10 years ago
Victor Julien 20990f7a7e dns: fix out of bounds read
On a zero size A or AAAA record, 4 or 16 bytes would still be
read.

Found with AFL+ASAN.
10 years ago
Jason Ish 4a04f814b1 defrag - take protocol into account during re-assembly
The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host.
10 years ago
Victor Julien 292baf0872 afl: add ethernet and erspan entry points 10 years ago
Victor Julien 49c41fc79e afl: clean up commandline parsing 10 years ago
Victor Julien b56b04f84c afl: pass a packet queue to decoder calls 10 years ago
Jason Ish 35488eefda afl: set the packet data so pktlen gets set 10 years ago
Victor Julien fbd69729aa afl: improve packet fuzz testing
Due to the use of AFL_LOOP and initialization/deinit outside of it,
part of the fuzzing relied on the global 'state' in flow and defrag.
Because of this crashes that were found could not be reproduced. The
saved crash input was only the last in the series.

This patch addresses that. It requires a new output directory 'dump'
where the packet fuzzers will store all their input. If the AFL_LOOP
fails the files will not be removed and this 'serie' can be read
again for reproducing the issue.

e.g.: AFL would work with:
--afl-decoder-ppp=@@

and after a crash is found the produced serie can be read with:
--afl-decoder-ppp-serie=1486656919-514163

The series have a timestamp as name and a suffix that controls the
order in which the files will be 'replayed' in Suricata.
10 years ago
Victor Julien 923d93f314 afl: add decoder ipv4 option 10 years ago
Sascha Steinbiss 5e96977983 mpm-ac: fix integer overflow on allocation
The size of a memory buffer to be allocated was kept in a signed int
instead of a size_t, leading to an overflow when large lists of long
and diverse patterns cause the amount of AC states to blow up (>2GB).
Fixes Redmine issues #1827 and #1843.

Signed-off-by: Sascha Steinbiss <sascha@steinbiss.name>
10 years ago
Sascha Steinbiss b25b067d93 alert: silence compiler type warning
The `ts_ecr' and `ts_val' struct fields are integer types, not
pointers. This leads GCC 6.3.0 to complain about comparisons to
NULL.

Signed-off-by: Sascha Steinbiss <sascha@steinbiss.name>
10 years ago
Victor Julien 86222428dd detect: don't run IP inspection on non-IP packets
The code to get the rule group (sgh) would return the group for
IP proto 0 instead of nothing. This lead to certain types of rules
unintentionally matching (False Positive).

Since the packets weren't actually IP, the logged alert records
were missing the IP header.

Bug #2017.
10 years ago
Victor Julien 4683b0e662 afl: fix ENIP, switch DNS to UDP and add --afl-dnstcp* 10 years ago
Victor Julien c89ce17017 afl: with -Wshadow issues 10 years ago
Eric Leblond ecf59be413 af-packet: add VLAN header when needed in IPS mode
When packet is coming from a real ethernet card, the kernel is
stripping the vlan header and delivering a modified packet so
we need to insert the VLAN header back before sending the packet
on the wire.

To do so, we pass an option to the raw socket to add a reserve
before the packet data. It will get Suricata some head room to
to move the ethernet addresses before there actual place and
and insert the VLAN header in the correct place.

We get VLAN info from the ring buffer as the call of AFPWrite is
always done in the release function so we still have access to the
memory.
10 years ago
Eric Leblond f407d77016 detect-tls-sni: add link to documentation 10 years ago
Eric Leblond 1af713d67d detect-tls: add url field pointing to doc 10 years ago
Eric Leblond 0695ad4bf0 detect-xbits: set documentation URL 10 years ago
Jason Ish 21bbac5648 dns-log: log requests even when there is no response
The JSON logger had already been updated to handle
transactions without a response. Apply the same logic
to the older dns-log where a logger is registered
for each direction.

Fixes issue 2012.
10 years ago
Andreas Herz d8b5bf9bc6 app-layer-parsing: detect malformed input
If the app-layer-parsing has a very long content it exceeds the maximum
defined in "alproto_name". This adds a check for the too long content
before it will be passed to "strlcpy" and logs an error.
10 years ago
Victor Julien f91d490d25 detect: remove unused flow_locked hint 10 years ago
Victor Julien 31a96d5a79 detect: make tenant loading less verbose 10 years ago
Victor Julien addf64f1f7 profiling: fix memory leaks 10 years ago
Victor Julien 6e876182d7 detect: use TLS_STATE_CERT_READY in cert inspect 10 years ago
Victor Julien 473dae75b5 tls: introduce 'cert ready' state 10 years ago
Victor Julien 15accc86c9 common: add BIT_U8 macro 10 years ago
Sascha Steinbiss e6044aaf1c mpm/spm: check for SSSE3 and enable/disable HS
The new Hyperscan 4.4 API provides a function to check for SSSE3
presence at runtime. This allows us to fall back to non-Hyperscan
matchers on systems without SSSE3 even when the suricata executable
is built with Hyperscan support. Addresses Redmine issue #2010.

Signed-off-by: Sascha Steinbiss <sascha@steinbiss.name>
Tested-by: Arturo Borrero Gonzalez <arturo@debian.org>
10 years ago
Victor Julien a0580d8805 stream: initialize stream segment pool from mtu
If segments section in the yaml is ommitted (default) or when the
pool size is set to 'from_mtu', the size of the pool will be MTU
minus 40. If the MTU couldn't be determined, it's assumed to be
1500, so the segment size for the bool will be 1460.
10 years ago
Victor Julien 1ba15d3721 mtu: track max mtu for capture devices 10 years ago
Victor Julien 7ca466c598 shutdown: remove pid file last 10 years ago
Victor Julien 816dd7b301 startup: clean up main loop 10 years ago
Victor Julien 2eec07cc3a unittests: clean up registration and startup 10 years ago
Victor Julien f452df761a shutdown: move global shutdown steps into func 10 years ago
Victor Julien babe8a299e startup/shutdown: cleanup and unify with unix mode 10 years ago
Victor Julien 3c64cfb384 threads: fix missed logging at shutdown
At shutdown, all flows that still need work are handled by the flow
force reassembly logic. This means one or more flow end pseudo packets
are generated and pushed through the engine for final detection and
logging.

In some cases this would not work correctly. This was caused by the
flow timeout logic kicking in before all the 'live' packets were
processed. Before the flow timeout handling runs the receive threads
are disabled, however the engine did not wait for the in-flight
packets to be fully processed. In autofp mode, packets could still
be in the queue between receive thread(s) and flow worker(s).

This patch adds a new function that 'drains' all the packet threads
of any in-progress packets before moving on the flow timeout logic.

Bug #1946.
10 years ago
Mats Klepsland a2659ed7ec output-json-flow: add has_alerts field
Add has_alerts field to flow eve-log to indicate if a flow has
any alerts or not.
10 years ago
Mats Klepsland c531e8f77c lua: add SCFlowHasAlerts function
Add SCFlowHasAlerts() to check if a flow has alerts. Returns true
on alerts, false otherwise.

Example:

  has_alerts = SCFlowHasAlerts()
  if has_alerts then
    -- do something
  end
10 years ago
Mats Klepsland d9b87e502d flow: set flag to indicate that a flow has alerts
Set FLOW_HAS_ALERTS flag on the flow on alerts. Add FlowHasAlerts(..)
and FlowSetHasAlertsFlag(..) to check and set this flag.
10 years ago
Eric Leblond 569cc5d238 util-file: introduce new functions for file size
This patch introduces the FileDataSize and FileTrackedSize functions.
The first one is just a renaming of the initial FilSize function
whereas the other one is using the newly introduced size field as
value.
10 years ago
Eric Leblond a098896b28 output-json-file: use size instead of FileSize
FileSize is not returning the actual value when file store is not
used.
10 years ago
Eric Leblond fbc2dbac28 util-file: change file size computation
The file size returned by FileSize is invalid if file store is not
used so we introduce a new size field in File structure that is used
to store the size.
10 years ago
Alexander Gozman 187a6f392c Bug #2009: added CAP_NET_ADMIN for PCAP and af-packet modes.
Without this capability suricata is unable to get network
interface's settings.
10 years ago
Jason Ish 19e578a740 pcap-log: fix pcre_study error check
Code was failing on a NULL return value which can be returned
when there was nothing todo instead of an error. Instead
check the errbuf for a non-NULL value to determine error.
10 years ago
Jason Ish 5c55373679 app-layer-detect-proto.c: fix indent
A recent commit was outdented by 1 column.
10 years ago
Jason Ish ec44585dca app-layer - fix secondary probing parser logic
Apply the same logic to pe2 as pe1 for determining which
probe to call. Missed in previous commit.
10 years ago
Victor Julien cb36dee477 hyperscan: fix minor coverity issue in error path
*** CID 1398951:  API usage errors  (LOCK)
/src/util-mpm-hs.c: 722 in SCHSPreparePatterns()
716         SCMutexUnlock(&g_db_table_mutex);
717
718         SCHSFreeCompileData(cd);
719         return 0;
720
721     error:
>>>     CID 1398951:  API usage errors  (LOCK)
>>>     "pthread_mutex_unlock" unlocks "g_db_table_mutex" while it is unlocked.
722         SCMutexUnlock(&g_db_table_mutex);
723         if (pd) {
724             PatternDatabaseFree(pd);
725         }
726         if (cd) {
10 years ago
Victor Julien fa8cbd8741 smb: detect protocol in both directions 10 years ago
Jason Ish e9fccfa67c tx logging: only update logged tx id if all loggers logged
Prevents the case where the logged id is incremented if a newer
transaction is complete and an older one is still outstanding.

For example, dns request0, unsolicited dns response, dns response0

would result in the valid response0 never being logged.

Similarily this could happen for:
  request0, request1, response1, response0

which would end up having request0, request1 and response1 logged,
but response0 would not be logged.
10 years ago
Eric Leblond 0d5fd0f658 util-file: fix error logic in hash computation
This patch fixes an issue with hash computation resulting in the
invalidity of at least one hash when at least two different hashes
functions were used.

Impact was setting as `force-hash: [md5, sha256]` not to be valid.
Also it could lead to false negative if too different hash functions
had to be used on a single file due to signatures.
10 years ago
Jason Ish 20111cab23 unix-socket: fix shadowed variable
ret does not need to be redefined here, the existing
declaration of ret can be used.
10 years ago
Victor Julien f964cdbc93 address parsing: fix memory leak in error path 10 years ago
Victor Julien a6fccd952e ssl: suppress scan-build warnings 10 years ago
Victor Julien 61b72c6981 output: clean up output function
Don't allocate memory per call.
10 years ago
Victor Julien 709d20f8c6 smb/dcerpc: suppress scan-build warnings 10 years ago
Victor Julien 618ab4e177 ac-bs: fix scan-build warnings 10 years ago
Victor Julien bbc02205fb queue: add debug assertions to TAILQ
To avoid scan-build fp's add assertions that are only active if
built with scan-build.
10 years ago
Mats Klepsland 03ad9d4ec0 tls-store: fix bug that causes Suricata to crash
Fix bug that causes Suricata to crash when the tls.store keyword is used.

*** Error in `/usr/bin/suricata': free(): invalid next size (fast):
0x00007fd4b4373180 ***
10 years ago
Jason Ish 87b5bf9541 proto detect - fix coverity CID 1204325
CID 1204325 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: mask = 0U;.
433        mask = 0;

additionally, mask is initialized to 0
10 years ago
Jason Ish d09cd16c8c template logger - fix coverity CID 1324964
null: At condition templatejs != NULL, the value of templatejs must be
NULL.
dead_error_condition: The condition templatejs != NULL cannot be true.
113    if (templatejs != NULL) {
CID 1324964 (#1 of 1): Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement:
json_decref(templatejs);.
114        json_decref(templatejs);
115    }
10 years ago
Jason Ish a10a9220cf dns (tcp) - fix coverity CIDs 1374306, 1374305
CID 1374306 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking dns_state suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
585    if (dns_state != NULL && f != NULL) {
586        dns_state->last_req = f->lastts;
587    }

CID 1374305 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking dns_state suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
366    if (dns_state != NULL && f != NULL) {
367        dns_state->last_req = f->lastts;
368    }
10 years ago
Jason Ish dfbfb50f64 dns (tcp) - fix coverity cid 1374307
CID 1374307 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking dns_state suggests that it may be null,
but it has already been dereferenced on all paths leading to the check.
317    if (dns_state != NULL && f != NULL) {
318        dns_state->last_resp = f->lastts;
319    }
10 years ago
Eric Leblond 5b1de57d73 detect-parse: simplify port prefiltering
Regular expression was not matching some authorized setting like
"![1234, 1235]". This patch simplify the regexp to match on
possible character and let the port parsing code handle the
complete verification.
10 years ago
Jason Ish b0de5ad1a8 dns: increment tx id when allocated during response 10 years ago
Victor Julien fe4e119278 common: improve BUG_ON
When BUG_ON is a wrapper for assert(), we risk getting rid of certain
code lines. Assert is a no-op when NDEBUG is defined.

This patch defines an alternate path for BUG_ON that exits after
printing an error.

Bug #2003.
10 years ago
Andreas Herz 98e8b13bf0 decode-icmpv6: add missing types
There have been some ICMPv6 types missing within the DecodeICMPV6 that
are added by this commit and the code check is adjusted to always use
the DEFINE.
10 years ago
Jason Ish bcdbd12839 dns (tcp): register a to_client (response) probing parser
Just a minimal parser to make sure the data contains at
least a header.
10 years ago
Jason Ish c35c18a797 app-layer: support to server and to client probing parsers
When registering a probing parser allow to_server and
to_client parsers to be registered. Previously the
probing parser may be called for both directions which
in some cases works OK, but in others can cause
the to_client side to be detected as failed.
10 years ago
Victor Julien 586774203f redis: support for all output types 10 years ago
Victor Julien 2820ed332e redis: use 'binary' notation for output 10 years ago
Victor Julien df28c1ac6e common: add WARN_UNUSED macro 10 years ago
Victor Julien 8c65d45d55 detect: remove dead code 10 years ago
Eric Leblond 63a3b84127 util-magic: fix build when magic is not available
If HAVE_MAGIC is not defined then we don't have the test functions
so we can't register them.
10 years ago
Victor Julien cb08f02140 xbits: clean up parsing and tests 10 years ago
Jason Ish 27ec811187 pcap-log: fix memory leak during initialization of ring buffer
A free was missing when files are removed during initialization
of the ring buffer.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/1985
10 years ago
Eric Leblond 9f6b58747b smtp: commands and replies are not case sensitive
RFC states that "Commands and replies are not case sensitive" and
patterns were registered to be case sensitive. So this patch fixes
a trivial evasion of SMTP signatures.
10 years ago
Mats Klepsland ffcb4ad232 tls: fix tls_cert_subject prefilter bug
If check in prefilter was checking that issuer was non-NULL, when
it in fact should be checking subject.
10 years ago
Mats Klepsland 10c93221fa tls: increase max number of tls records per packet
Tls packets may contain several records. This increase the number
of allowed records per packet from 30 to 255, and adds a new and
more informative decoder event when this limit is reached.
10 years ago
Mats Klepsland 554065189c tls: don't trigger decoder event on no extensions in CLIENT_HELLO
No extensions are allowed in <TLSv.1.2, so don't trigger SURICATA
TLS handshake invalid length decoder event when no extensions are
specified in CLIENT HELLO.
10 years ago
Victor Julien 810e43f373 magic: make optional
Make libmagic optional. If installed it will be enabled by default in
configure. Use --disable-libmagic to disable.
10 years ago
Jason Ish 79a3c6c7b1 log-pcap: use a snaplen of 262144 instead of -1.
Newer versions of libpcap will not open pcap files with a
snaplen of -1, instead use the current maximum value of
262144.

Issue:
https://redmine.openinfosecfoundation.org/issues/1987
10 years ago
Victor Julien a44b612a41 hostbits/xbits: free hostbit
Fix memory leak. Hostbits were not actually freed.

Bug #1975.
10 years ago
Victor Julien 579d6d3ff7 http: allow lower/mixed case in proto detect
In HTTP detection registered patterns were upper case only. Since the
detection is based on both sides this would still work for sessions
where one of the talkers misbehaved. If both sides misbehave this
would fail however, so this patch introduces case insensive matching.
10 years ago
Jason Ish 92885d6960 profiling: fix shadow error
Local variable store was shadowing variable in function
definition.
10 years ago
Victor Julien abbc0f76eb unix-socket: clean up path handling
Create/check socket path in a single place. Don't use dynamic
memory allocation.
10 years ago
Victor Julien c5e550b10d unix-socket: create socket directory if possible
Create the socket directory in the default case.

Since we're doing stat+mkdir indicate to Coverity not to worry about
the toctou case.
10 years ago
Victor Julien 3f741e450b unix-socket: be more specific about problems 10 years ago
Victor Julien 9368013645 unix-socket: don't error out on unix socket failure
If --init-errors-fatal is specified do error out.

Bug https://redmine.openinfosecfoundation.org/issues/1973
10 years ago
Jason Ish 2ce95babd6 dnp3: use _ in keyword names instead of "."
dnp3.ind -> dnp3_ind
dnp3.func -> dnp3_func
dnp3.obj -> dnp3_obj

The variations with a "." are now aliases.
10 years ago
Victor Julien ab8faefd37 af-packet: fix fanout support on Debian Jessie
Debian Jessie with kernel 3.16 would not accept the 'id' of 99 used
in the test. Id 1 does work.
10 years ago
Alexander Gozman e492f0dc89 Fix port parsing in config file, added one more corresponding test.
Some examples from wiki caused parsing errors.
For example, "[1:80,![2,4]]" was treated as a mistake.

Also fixed loop detection in variables declaration. For example,
'A: "HOME_NET, !$HOME_NET"' resulted in parsing error.
10 years ago
Jason Ish ba6a1aa73e unittest-helper: fix format string compiler warnings 10 years ago
Jason Ish 4aceaf9fcd detect-stream_size: fix format string compiler warnings 10 years ago
Jason Ish c0377a9870 stream-tcp: fix format string compiler warnings 10 years ago
Jason Ish 5c80a3edf7 modbus: fix format string compiler warnings 10 years ago
Jason Ish 53a8c75385 dnp3: rename "index" variables to "point_index"
Gcc 4.6 will warning with -Wshadow for a local variable
named "index" as <strings.h> has a function named "index".

Newer versions of gcc handle this case.
10 years ago
Victor Julien b4ac048b41 proto detect: fix -Wshadow warning 10 years ago
Victor Julien 07e1e3e02a dcerpc: fix -Wshadow warnings 10 years ago
Victor Julien 783d2991e5 commandline: fix -Wshadow warnings 10 years ago
Victor Julien 66c213f30c detect-address: fix -Wshadow warnings 10 years ago
Victor Julien 9a20335b6d asn1: fix -Wshadow warnings 10 years ago
Victor Julien dab51144af asn1: modernize test 10 years ago
Victor Julien 613174e9ce yaml: fix tests for -Wshadow 10 years ago
Victor Julien 968813b655 dnp3: fix test for -Wshadow 10 years ago
Victor Julien bb2d8a7133 runmodes: fix -Wshadow warnings 10 years ago
Victor Julien 8c1d157cd2 mpm ac-bs: fix -Wshadow warnings 10 years ago
Victor Julien 0d6d8e01c8 threads: fix -Wshadow warnings 10 years ago
Victor Julien cd04da673b commandline: fix -Wshadow warnings 10 years ago
Victor Julien 69ee2f0eb9 nfq: fix -Wshadow warnings
Rename globals to make sure it's clear they are globals.
10 years ago
Victor Julien 65d2443ccd reputation: fix -Wshadow warnings 10 years ago
Victor Julien d893bc55e0 eve-flow: fix -Wshadow warning 10 years ago
Victor Julien 9477fd4628 eve-file: fix -Wshadow warnings 10 years ago
Victor Julien ed0918bc35 ippair: fix -Wshadow warning 10 years ago
Victor Julien 5f786b5cd7 host: fix -Wshadow warning 10 years ago
Victor Julien 0c3b89356e flow: fix -Wshadow warning 10 years ago
Victor Julien 70452f67a4 within: fix -Wshadow warning 10 years ago
Victor Julien 47c4a8cd28 prefilter: fix -Wshadow warnings 10 years ago
Victor Julien f2f0f84cca detect: fix -Wshadow warning 10 years ago
Victor Julien 070a6caaf3 app engines: fix -Wshadow warning 10 years ago
Victor Julien 691fae6520 address: fix -Wshadow warning 10 years ago
Victor Julien 34b030b45f distance: fix -Wshadow warning 10 years ago
Victor Julien d50b4b8471 content: fix -Wshadow warning 10 years ago
Victor Julien 02df79f67b mem: fix SCStrdup -Wshadow warning 10 years ago
Victor Julien f97e857c02 dns: fix -Wshadow warnings 10 years ago
Victor Julien 6a971a5a02 app-layer-proto-detect: fix -Wshadow warning 10 years ago
Victor Julien 287fd83796 dnp3: fix coverity CID 1374300 10 years ago
Victor Julien 8915f2de38 flow: suppress coverity CID 400600 10 years ago
Victor Julien edcc8e7ec9 stat: suppress CID 1293508 and 1312013 10 years ago
Victor Julien 7021959689 nfq: suppress CID 1374302 and 1374303 10 years ago
Victor Julien da6bf0c1b6 host-info: coverity 1298890 10 years ago
Victor Julien 9904b3f348 ttl: coverity 400560 + minor cleanups 10 years ago
Victor Julien d30f7f6b48 tos: coverity 400559 10 years ago
Victor Julien ad8f9f9334 ssl-state: coverity 400558 10 years ago
Jason Ish c91974e24a issue 1961: depth: fail if numeric value has trailing text
Catches the case where the depth is not terminated with a
semicolon (eg: "depth:17 classtype:trojan-activity") which
is usually a sign the rule has a missing semi-colon.
10 years ago
Jason Ish a1eca40611 log-pcap.c: cleanup scan-build warning
Don't initialize value to a value that is never used.
10 years ago
Jason Ish 553f7ec290 log-pcap.c: fix resource leak found by coverity
Goto the failure label instead of returning which will allow the open
directory to get cleaned up.

Fixes:

*** CID 1394675:  Resource leaks  (RESOURCE_LEAK)
/src/log-pcap.c: 615 in PcapLogInitRingBuffer()
609                  * failure as the file might just not be a pcap log file. */
610                 continue;
611             }
612
613             PcapFileName *pf = SCCalloc(sizeof(*pf), 1);
614             if (unlikely(pf == NULL)) {
>>>     CID 1394675:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "dir" going out of scope leaks the storage it points to.
615                 return TM_ECODE_FAILED;
616             }
617             char path[PATH_MAX];
618             snprintf(path, PATH_MAX - 1, "%s/%s", pattern, entry->d_name);
619             if ((pf->filename = SCStrdup(path)) == NULL) {
620                 goto fail;

This also means that pf can be NULL which should clear up CID
1394676 (REVERSE_INULL).
10 years ago
Jason Ish bbb93e487e pcap-log: seed ring buffer on start up
On start, look for existing pcap log files and add them to
the ring buffer. This makes pcap-log self maintaining over
restarts removing the need for external tools to clear
orphaned files.
10 years ago
Eric Leblond a2e2f50fb9 documentation: fix list keywords URLs
Update URLs in keyword definition to point to sphinx documentation.
10 years ago
Jason Ish fffdc6e3fd logging: hook the application log file into rotation 10 years ago
Jason Ish 73a1d04779 logging: open application log file in append mode
It was being open in read/write mode, which was likely
a mistake with append mode being the intention.
10 years ago
Jason Ish 666fecc579 dns: accept a data length of 0 without marking as malformed
Addresses issue:
https://redmine.openinfosecfoundation.org/issues/1924
10 years ago
Jason Ish d5eca41a71 ipfw: disable more code to suppress compiler warnings
Disabled code lead to unused variable warnings, so disable the
variable code as well.
10 years ago
Jason Ish 2b874abada compiler warnings: fix compiler warnings in format strings 10 years ago
Victor Julien 3f8ee2afd3 detect-lua: unify on using 'lua' name vs 'luajit' 10 years ago
Victor Julien 0366d47608 luajit: remove unused instance counter 10 years ago
Victor Julien 3da7dad514 lua: luajit improvements
Luajit has a strange memory requirement, it's 'states' need to be in the
first 2G of the process' memory.

This patch improves the pool approach by moving it to the front of the
start up.

A new config option 'luajit.states' is added to control how many states
are preallocated. It defaults to 128.

Add a warning when more states are used then preallocated. This may fail
if flow/stream/detect engines use a lot of memory. Add hint at exit that
gives the max states in use if it's higher than the default.
10 years ago
Victor Julien 064c070db7 pcap-file: minor cleanup 10 years ago
Victor Julien 238163bc8d ENIP: disable parser if no config found 10 years ago
Victor Julien 080a2f0cfb DNP3: disable in case of no dnp3 config 10 years ago
Jason Ish 65bf06975c dnp3: fix coverity checks; return value not checked 10 years ago
Victor Julien 1f670837ac detect: add missing break (CID 1374301) 10 years ago