Commit Graph

469 Commits (32594766b701666a8768b48d724cdd63b74ea469)

Author SHA1 Message Date
Nancy Enos 2d13df6872 configure: Remove obsolete rust support line
Ticket: #6705
3 months ago
Jeff Lucovsky 88451b400d configure: fail on --enable-napatech and --disable-shared
Issue: 7165

Plugins can't be build using the standard autoconf/automake
methods. We can get around this by creating our own Makefiles, but
they're often less portable.

For now, fail during ./configure instead of during compile.
5 months ago
Jeff Lucovsky 792f5e1d57 napatech: load plugin by default
Issue: 7165
5 months ago
Jeff Lucovsky d5feb8accc napatech: add as plugin
Issue: 7165
5 months ago
Liam Wilson 592d860434 configure: clear cached header value
Unset ac_cv_header_hs_h before checking for header. This allows
hyperscan to be included in compilation when switching from a non-hs
build to a hs build.
5 months ago
Philippe Antoine bb714c9178 http: have a headers limit
Ticket: 7191

So as to avoid quadratic complexity in libhtp.
Make the limit configurable from suricata.yaml,
and have an event when network traffic goes over the limit.
5 months ago
Jason Ish cdcb395142 examples: add custom logging plugin
Add an example custom logger that hooks into the low level packet and
flow logging callbacks.

Ticket: #7227
6 months ago
Victor Julien cff82f16b3 pcap-file: limit setvbuf to linux
As it fails to work correctly on FreeBSD and OpenBSD.

On FreeBSD, these are the errors:

Info: pcap: Pcap-file will use 4096 buffer size [PcapFileGlobalInit:source-pcap-file.c:159]
Error: pcap: failed to get first packet timestamp. pcap_next_ex(): -2 [PeekFirstPacketTimestamp:source-pcap-file-helper.c:186]
Warning: pcap: Failed to init pcap file input.pcap, skipping [ReceivePcapFileThreadInit:source-pcap-file.c:299]
Error: pcap: pcap file reader thread failed to initialize [ReceivePcapFileLoop:source-pcap-file.c:185]
6 months ago
Victor Julien 7b730c2e68 pcap-file: improve setvbuf implementation
Make optional through `pcap-file.buffer-size` config option.

Make sure to check through configure.

Ticket: #7155.
6 months ago
Victor Julien 058ad87089 rust: set MSRV to 1.67.1
This is needed for updating the ``time`` crate.
7 months ago
Philippe Antoine eff7b52327 build: Wimplicit-int-float-conversion checked with --enable-warnings
When configure is used with --enable-warnings, we try to add most
warning flags that should pass.
This commits adds the warning Wimplicit-int-float-conversion
8 months ago
Jason Ish 4d0e09c6b2 configure: fail on --enable-pfring and --disable-shared
Plugins can't be build using the standard autoconf/automake
methods. We can get around this by creating our own Makefiles, but
they're often less portable.

For now, fail during ./configure instead of during compile.
8 months ago
Jason Ish 155501f250 pf-ring: load plugin by default
Ticket: #7162
8 months ago
Jason Ish 79df4b4c89 pf-ring: add as plugin
Ticket: #7162
8 months ago
Philippe Antoine 4bbe7d92dc detect: helper to have pure rust keywords
detect: make number of keywords dynamic

Ticket: 4683
9 months ago
Philippe Antoine 1c0514c16a dpdk: simplify and fix build 9 months ago
Philippe Antoine 358bc05fa1 ci: fix and test with Wunused-macros
Ticket: 6937

Completes ce9bfba76a
9 months ago
Jason Ish 2e440169d6 lua: remove lua as a compile time feature
Its always built-in. However, can be disabled at runtime.
9 months ago
Jason Ish 1fd2c1a379 rust/lua: remove lua_int8 feature
Now that we're fixed to Lua 5.4, the integer size is always 8.
9 months ago
Jason Ish bc011f2205 lua: use rust crate to vendor (bundle) lua
Remove lua-dev(el) from all CI tests.
9 months ago
Jo Johnson d5c6c3a21c lua: build lua by default
Ticket: #4776

[Edits by Jason Ish]
- Add Lua in CI where needed
- Disable Lua for builds that don't have Lua 5.4
9 months ago
Jo Johnson 712496bb3f lua: Remove luajit support
lua 5.4 support is not available in luajit

Ticket: #4776
9 months ago
Jo Johnson 586c92d9d5 lua: require lua 5.4
github-ci: Disable lua on debian 10 as it doesn't have Lua 5.4.

Ticket: #4776
9 months ago
Philippe Antoine ce9bfba76a ci: fix and test with Wunused-macros
Ticket: 6937
9 months ago
Jason Ish 8560564657 rust: rename .cargo/config to .cargo/config.toml
Addresses this warning from the Rust compiler:

warning: `../rust/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
10 months ago
Philippe Antoine 7582b18a9f http: configures libhtp to allow spaces in uri
Ticket: #2881
10 months ago
Sascha Steinbiss 120313f4da ja4: implement for TLS and QUIC
Ticket: OISF#6379
11 months ago
Sascha Steinbiss 9d0db71ebf ja3: make feature compile time configurable 11 months ago
Victor Julien 34f53f85bc systemd: reimplement sd_notify logic using UNIX socket
One of the lessons of the XZ backdoor story was that just linking to
libsystemd to call sd_notify is discouraged by the systemd project:

Lennart Poettering:
"PSA: In context of the xzpocalypse we now added an example reimplementation
of sd_notify() to our man page:

https://www.freedesktop.org/software/systemd/man/devel/sd_notify.html#Notes

It's pretty comprehensive (i.e. uses it for reload notification too), but
still relatively short.

In the past, I have been telling anyone who wanted to listen that if all you
want is sd_notify() then don't bother linking to libsystemd, since the
protocol is stable and should be considered the API, not our C wrapper
around it. After all, the protocol is so trivial"

From: https://mastodon.social/@pid_eins/112202687764571433

This commit takes the example code and uses it to reimplement the notify
logic.

The code is enabled if Linux is detected in configure. Since the code
won't do anything if the NOTIFY_SOCKET env var isn't set, this should
also work fine on systems w/o systemd.

Ticket: #6913.
11 months ago
Victor Julien ff50dc49ef configure: tabs to spaces; minor reformatting 11 months ago
Jason Ish 568b941d7e configure: .git can be a file as well
In worktree scenarios, .git is a file. Assuming its a directory causes
the release date to check the ChangeLog instead of the last commit,
while not a big issue, can be confusing.
11 months ago
Jason Ish b58dd5e585 configure: export release date for documentation
Sphinx embeds a date in the generated man pages, and to provide
reproducible builds this date needs to be provided to Sphinx,
otherwise it will use the current date.

If building from Git, extract the date from the most recent commit. In
a release, this commit would be the commit that sets the version so is
accurate.

If .git does not exist, use the most recent data found in the
ChangeLog.

The ChangeLog is not used when building from git, as the main/master
branch may not have recent enough timestamps.

This should provide a consistent date when re-building the
distribution from the same non-git archive, or from the same git
commit.

Ticket: #6911
11 months ago
Jason Ish c00c2b116f configure: don't check ./revision, it never exists
Stop checking the ./revision file for the git revision info, its never
created.
11 months ago
Victor Julien c4ac6cdc9a detect: optimize sig_cnt setting
Utilize _popcnt64 where available.
1 year ago
Jason Ish 0dc3de332a examples: minimal example capture plugin for ci
Create a mininal capture plugin that injects one packet. While it can
also be a template, we should be able to run this in CI to test the
loading and registration of the capture plugin mechanisms.
1 year ago
Jason Ish 5ed3f905ac examples/lib: work with bundled libhtp
The simple example Makefile.am was unconditionally including
$(HTP_LDADD) which might be empty resulting in "../.." ending up in the
Makefile causing the build to fail.

Instead, also make HTP_LDADD a conditional, so we can only include it
when actually set, and its only set when libhtp is bundled.

The reason this Makefile needs to include the path components "../.."
is because the HTP_LDADD value is relative to the top level "src/"
directory.
1 year ago
Jason Ish 2421b024f2 examples: program linking against library
Provide an example of an extremely simple application that links
against Suricata. This provides a Makefile integrated with the
Suricata build system for in-tree building, as well as an example
Makefile for building out of tree.

Currently this application just wraps SuricataMain and does nothing
else.
1 year ago
Philippe Antoine 4175680a8a http1: configurable max number of live tx per flow
Ticket: #5921

Co-authored-by: Jason Ish <jason.ish@oisf.net>
1 year ago
Vincent Li 64d12aacc8 ebpf: Update eBPF map to BTF defined map
legacy map definition is removed from libbpf1.0+.
update the legacy map definition to BTF defined map.

Distros with < libbpf1.0 (0.5, 0.6, 0.7, 0.8) bpf_helpers.h
support BTF map definition, this change does not break
old libbpf and support new libpbf1.0+.

Bug: #6250

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
Co-authored-by: Victor Julien <vjulien@oisf.net>
1 year ago
Thomas Winter 7d40a9f178 rule-reload: Release excess memory freed during engine reload
The hot reload results in large chunks of memory being freed as the
as the old signature tables are discarded. Help the memory management
system along by telling to release as much memory as it can at this
point.

Bug: #6454.
1 year ago
Jason Ish d2b25af3f4 examples: add an example plugin of an eve filetype
This is an example of what adding plugin examples to the Suricata repo
could look like.

This plugin is an example plugin for an EVE filetype. It could be
extended to support outputs like Redis, syslog, etc.

There is one issue with adding plugins like this to an autotools
project, the project can't be built with --disable-shared, which is
more of an autotools limitation, and not really a Suricata issue.
Suricata built with --disable-shared will load plugins just fine.

Note that the examples directory was added as DIST_SUBDIRS as we don't
want normal builds to recurse into it and attempt to build the plugin,
its just an example, but we still need to keep distcheck happy.
1 year ago
Victor Julien 2f4027c117 version: start work on 8.0.0 1 year ago
Victor Julien 2fe2d82506 version: start development towards 7.0.3 1 year ago
Shivani Bhardwaj d07e20c0a3 release: 7.0.2; update changelog 1 year ago
Lukas Sismis 1bcea5a992 dpdk: add hugepage hint to lower the amount of reserved hugepages
If a user allocates too many hugepages and those are largely not used
then Suricata suggests that the user can lower the amount of hugepages
and therefore save memory for other purposes.

Ticket: #5966
1 year ago
Victor Julien 908f49eef1 version: start development towards 7.0.2 1 year ago
Juliana Fajardini 8553d567d2 release: 7.0.1; update changelog 1 year ago
Jason Ish ae3b1a9e36 configure: more idiomatic autoconf for sphinx-build checks
- Use SPHINX_BUILD instead of HAVE_SPHINX_BUILD, as here we're
  actually using the path of the program.

- Wrap some elements in [] as is done in modern idiomatic autoconf
2 years ago
Jason Ish 82758fb09f configure: check for new enough sphinx-build
We need a recent version of Sphinx to build the documentation in
7.0. Check for a minimum version of 3.4.3. If older, do not build the
docs which is the same behavior when sphinx-build is not found.

Bug: #6297
2 years ago
Ralph Eastwood 95ecbd1178 configure: move -lntapi to LIBS variable
Previously -lntapi was appended to LDFLAGS which did not work with
all build environments.
2 years ago