output/log: ipv6-compress member to file context

Issue: 7399

Add compress ipv6 setting to file context.
pull/14941/head
Jeff Lucovsky 8 months ago committed by Victor Julien
parent 20b8829867
commit 4af77975e3

@ -510,6 +510,12 @@ int SCConfLogOpenGeneric(
snprintf(log_path, PATH_MAX, "%s/%s", log_dir, filename);
}
/* Compress IPv6 addresses */
const char *compress = SCConfNodeLookupChildValue(conf, "ipv6-compress");
log_ctx->compress_ipv6 = false;
if (compress != NULL && SCConfValIsTrue(compress))
log_ctx->compress_ipv6 = true;
/* Rotate log file based on time */
const char *rotate_int = SCConfNodeLookupChildValue(conf, "rotate-interval");
if (rotate_int != NULL) {

@ -146,12 +146,15 @@ typedef struct LogFileCtx_ {
* allow for rotation. */
uint8_t is_regular;
/* JSON flags */
size_t json_flags; /* passed to json_dump_callback() */
/* Compress ipv6 addresses? */
bool compress_ipv6;
/* Flag set when file rotation notification is received. */
int rotation_flag;
/* JSON flags */
size_t json_flags; /* passed to json_dump_callback() */
/* if set to true EVE will add a pcap file record */
bool is_pcap_offline;

@ -92,6 +92,8 @@ outputs:
enabled: yes
filename: fast.log
append: yes
# Compress IPv6 addresses per RFC5952 as they are added to the fast log. The default is no.
# ipv6-compress: no
#filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
# Extensible Event Format (nicknamed EVE) event log in JSON format
@ -147,6 +149,9 @@ outputs:
# include the name of the input pcap file in pcap file processing mode
pcap-file: false
# Compress IPv6 addresses per RFC5952 as they are added to the eve-log. The default is no.
# ipv6-compress: no
# Community Flow ID
# Adds a 'community_id' field to EVE records. These are meant to give
# records a predictable flow ID that can be used to match records to
@ -467,6 +472,8 @@ outputs:
enabled: no
filename: alert-debug.log
append: yes
# Compress IPv6 addresses per RFC5952 as they are added to the alert log. The default is no.
# ipv6-compress: no
#filetype: regular # 'regular', 'unix_stream' or 'unix_dgram'
# Stats.log contains data from various counters of the Suricata engine.

Loading…
Cancel
Save