]> git.ipfire.org Git - thirdparty/suricata.git/commit
eve/fivetuple: use intermediate address struct (jsonbuilder prep)
authorJason Ish <jason.ish@oisf.net>
Fri, 13 Mar 2020 19:25:56 +0000 (13:25 -0600)
committerVictor Julien <victor@inliniac.net>
Wed, 3 Jun 2020 11:36:55 +0000 (13:36 +0200)
commit99f460aa5a1e9a57c2157ca0aec649a97febeb4e
tree277c29f4ab4f2cfcef3c8caffd3fbec3a372ba13
parentcc4f9d7f3d45dbb2923471ec33ded694471461f8
eve/fivetuple: use intermediate address struct (jsonbuilder prep)

Currently alert logging relies on the ability to change existing
values in the json_t structure to overwrite addresses with xff
data. This feature is also used for the "target" logging.

As we can't do this with JsonBuilder, create a new struct to
hold the 5 tuple, with the values swapped as needed, and
overwritten with XFF data if needed. This struct will now
be used to write out the 5 tuple, as well as cache the information
for log fields to be written out later on in the log path.
24 files changed:
src/detect-engine-profile.c
src/output-json-alert.c
src/output-json-anomaly.c
src/output-json-dhcp.c
src/output-json-dnp3.c
src/output-json-dns.c
src/output-json-drop.c
src/output-json-file.c
src/output-json-ikev2.c
src/output-json-krb5.c
src/output-json-metadata.c
src/output-json-nfs.c
src/output-json-rdp.c
src/output-json-rfb.c
src/output-json-sip.c
src/output-json-smb.c
src/output-json-snmp.c
src/output-json-ssh.c
src/output-json-template-rust.c
src/output-json-template.c
src/output-json-tftp.c
src/output-json-tls.c
src/output-json.c
src/output-json.h