]> git.ipfire.org Git - thirdparty/suricata.git/log
thirdparty/suricata.git
5 years agoutil/proto: Convert validation routine to bool 5146/head
Jeff Lucovsky [Sun, 31 May 2020 12:20:28 +0000 (08:20 -0400)] 
util/proto: Convert validation routine to bool

This commit changes the signature of the protocol validation code to
bool and simplifies the validation steps.

5 years agooutput/json: Improve protocol output handling
Jeff Lucovsky [Sun, 31 May 2020 12:19:31 +0000 (08:19 -0400)] 
output/json: Improve protocol output handling

Improve protocol label handling by eliminating an unneeded copy.

Additionally, unknown protocol values are no longer zero-padded.

5 years agooutput/flow: Improve protocol output handling
Jeff Lucovsky [Sun, 31 May 2020 12:18:02 +0000 (08:18 -0400)] 
output/flow: Improve protocol output handling

This commit improves handling of the protocol label by removing an
unnecessary copy.

Additionally, unknown protocol values are no longer zero-padded.

5 years agolog/syslog: Improve protocol output handling
Jeff Lucovsky [Mon, 1 Jun 2020 14:23:12 +0000 (10:23 -0400)] 
log/syslog: Improve protocol output handling

Move protocol handling outside of the packet alert loop.

5 years agolog: Use updated SCProtoNameValid signature
Jeff Lucovsky [Mon, 1 Jun 2020 14:00:04 +0000 (10:00 -0400)] 
log: Use updated SCProtoNameValid signature

5 years agooutput/lua: Remove unused proto code
Jeff Lucovsky [Sun, 31 May 2020 12:07:33 +0000 (08:07 -0400)] 
output/lua: Remove unused proto code

This commit removes unused protocol string handling logic.

5 years agoapplayer template (rust): convert to JsonBuilder
Jason Ish [Tue, 7 Jul 2020 06:04:13 +0000 (00:04 -0600)] 
applayer template (rust): convert to JsonBuilder

5 years agoapplayer template (C): convert to JsonBuilder
Jason Ish [Tue, 7 Jul 2020 06:03:55 +0000 (00:03 -0600)] 
applayer template (C): convert to JsonBuilder

5 years agomodbus: align comments properly 5144/head
Shivani Bhardwaj [Wed, 8 Jul 2020 07:11:43 +0000 (12:41 +0530)] 
modbus: align comments properly

5 years agomodbus: make subfunction uint16_t
Shivani Bhardwaj [Wed, 8 Jul 2020 07:10:46 +0000 (12:40 +0530)] 
modbus: make subfunction uint16_t

5 years agoenip: remove unnecessarry definition
Shivani Bhardwaj [Fri, 26 Jun 2020 06:51:09 +0000 (12:21 +0530)] 
enip: remove unnecessarry definition

5 years agosrc: remove multiple uses of atoi
Shivani Bhardwaj [Tue, 23 Jun 2020 07:54:24 +0000 (13:24 +0530)] 
src: remove multiple uses of atoi

atoi() and related functions lack a mechanism for reporting errors for
invalid values. Replace them with calls to the appropriate
ByteExtractString* functions.

Closes redmine ticket 3053.

5 years agofuzz/sigpcap: make sure hassh is enabled
Victor Julien [Tue, 7 Jul 2020 19:27:08 +0000 (21:27 +0200)] 
fuzz/sigpcap: make sure hassh is enabled

5 years agouserguide: add documentation for Hassh usage 5141/head
Vadym Malakhatko [Tue, 30 Jun 2020 11:42:26 +0000 (14:42 +0300)] 
userguide: add documentation for Hassh usage

1. Rules keywords
2. Json keywords
3. Usage in lua
4. Enabling in configuration file

5 years agolua: add functions to get hassh parameters
Vadym Malakhatko [Tue, 30 Jun 2020 11:14:52 +0000 (14:14 +0300)] 
lua: add functions to get hassh parameters

5 years agoeve: add Hassh fields to SSH JSON logger and add ssh log condition
Vadym Malakhatko [Tue, 7 Jul 2020 14:05:36 +0000 (17:05 +0300)] 
eve: add Hassh fields to SSH JSON logger and add ssh log condition

5 years agodetect: add (mpm) hassh keywords
Vadym Malakhatko [Tue, 30 Jun 2020 10:20:52 +0000 (13:20 +0300)] 
detect: add (mpm) hassh keywords

Match on Hassh using ssh.hassh, ssh.hassh.server, ssh.hassh.string, ssh.hassh.server.string keywords, e.g:

alert ssh any any -> any any (msg:"match SSH hash"; ssh.hassh; content:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; sid:1000010;)
alert ssh any any -> any any (msg:"match SSH hash-server"; ssh.hassh.server; content:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; sid:1000020;)
alert ssh any any -> any any (msg:"match SSH hash-string"; ssh.hassh.string; content:"none,zlib@openssh.com,zlib"; sid:1000030;)
alert ssh any any -> any any (msg:"match SSH hash-server-string"; ssh.hassh.server.string; content:"umac-64-etm@openssh.com,umac-128-etm@openssh.com,"; sid:1000040;)

5 years agorust/ssh: add hassh generation
Vadym Malakhatko [Tue, 30 Jun 2020 09:59:34 +0000 (12:59 +0300)] 
rust/ssh: add hassh generation

Add generation of hassh fingerprints based on fields in the kexinit record

5 years agodetect/bsize: Use U16 bit macros 5139/head
Jeff Lucovsky [Mon, 18 May 2020 14:04:55 +0000 (10:04 -0400)] 
detect/bsize: Use U16 bit macros

This commit changes the flag bit values to be expressed using the
BIT_U16 macro instead with hex values.

5 years agodetect/bsize: Use SCLogDebug instead of printf
Jeff Lucovsky [Mon, 18 May 2020 13:59:40 +0000 (09:59 -0400)] 
detect/bsize: Use SCLogDebug instead of printf

This commit updates debug "printf" message to use SCLogDebug

5 years agodetect: Increase flag size for byte_jump
Jeff Lucovsky [Sun, 17 May 2020 13:51:40 +0000 (09:51 -0400)] 
detect: Increase flag size for byte_jump

5 years agogeneral: Fix typo in detect-bytejump.c
Jeff Lucovsky [Sat, 16 May 2020 18:53:01 +0000 (14:53 -0400)] 
general: Fix typo in detect-bytejump.c

5 years agodetect/bytejump: Add "from_end" support
Jeff Lucovsky [Sat, 16 May 2020 18:52:25 +0000 (14:52 -0400)] 
detect/bytejump: Add "from_end" support

This commit adds support for the byte jump "from_end" keyword and
unittests.

5 years agooutput/ikev2: Convert to JsonBuilder
Jeff Lucovsky [Fri, 3 Jul 2020 16:32:57 +0000 (12:32 -0400)] 
output/ikev2: Convert to JsonBuilder

Convert the IKEV2 Json logging to use JsonBuilder.

5 years agodnp3: adds unit test against previous bug
Philippe Antoine [Tue, 23 Jun 2020 07:08:22 +0000 (09:08 +0200)] 
dnp3: adds unit test against previous bug

5 years agodnp3: fix buffer over read in responses parsing
Philippe Antoine [Sun, 21 Jun 2020 20:22:47 +0000 (22:22 +0200)] 
dnp3: fix buffer over read in responses parsing

5 years agodnp3: probing parser fixes direction based on dnp3 header
Philippe Antoine [Fri, 19 Jun 2020 09:53:16 +0000 (11:53 +0200)] 
dnp3: probing parser fixes direction based on dnp3 header

5 years agofuzz: disable DNP3 checksums while fuzzing
Philippe Antoine [Fri, 19 Jun 2020 09:43:04 +0000 (11:43 +0200)] 
fuzz: disable DNP3 checksums while fuzzing

5 years agofuzz: improves fuzz target applayerparserparse
Philippe Antoine [Fri, 19 Jun 2020 09:34:44 +0000 (11:34 +0200)] 
fuzz: improves fuzz target applayerparserparse

Does not proceed final chunk if we got an error previously
Flips the direction for last chunk as usual

5 years agoflow: use stream state to string util func
Victor Julien [Sat, 4 Jul 2020 12:52:39 +0000 (14:52 +0200)] 
flow: use stream state to string util func

5 years agostream: add state to string funcs
Victor Julien [Fri, 3 Jul 2020 12:35:07 +0000 (14:35 +0200)] 
stream: add state to string funcs

5 years agoapp-layer: set EOF flag in case of unsupported GAP
Victor Julien [Thu, 2 Jul 2020 19:18:11 +0000 (21:18 +0200)] 
app-layer: set EOF flag in case of unsupported GAP

If GAP is not supported set EOF flags in the parser.

5 years agoflow: improve 'under stress' behavior
Victor Julien [Mon, 27 Jan 2020 09:34:00 +0000 (10:34 +0100)] 
flow: improve 'under stress' behavior

When under stress, the packet threads ultimately fall back
to walking the hash table until they find a flow they can
safely evict and reuse. This could lead to all threads
fighting over the FlowBucket locks.

Fix by adding a limit to the number of hash rows that are
checked for a new flow. If the limit is reached, simply fail
to get a flow.

5 years agoflow: fix TCP closed default initialization
Victor Julien [Tue, 28 Jan 2020 09:33:23 +0000 (10:33 +0100)] 
flow: fix TCP closed default initialization

TCP closed state was initialized to 0 by default.

Clean up 'closed' value setting for other protocols and the common
default.

5 years agoflow: remove unused function declaration
Victor Julien [Thu, 23 Jan 2020 18:20:55 +0000 (19:20 +0100)] 
flow: remove unused function declaration

5 years agoflow: remove unused sctp enum member
Victor Julien [Sun, 3 May 2020 09:10:28 +0000 (11:10 +0200)] 
flow: remove unused sctp enum member

This caused some arrays to be larger than needed.

5 years agoflow: cleanup validation check
Victor Julien [Mon, 11 May 2020 15:33:02 +0000 (17:33 +0200)] 
flow: cleanup validation check

5 years agosmb: fix 'dangling' files in lossy sessions 5138/head
Victor Julien [Fri, 15 May 2020 07:57:42 +0000 (09:57 +0200)] 
smb: fix 'dangling' files in lossy sessions

In case of lossy connections the SMB state would properly clean up
transactions, including file transactions. However for files the
state was never set to 'truncated', leading to files to stay 'active'.

This would lead these files staying in the SMB's state. In long running
sessions with lots of files this would lead to performance and memory
use issues.

This patch cleans truncates the file that was being transmitted when
a file transaction is being closed.

5 years agosmb: check post-gap timeouts once a second at most
Victor Julien [Sun, 17 May 2020 12:24:07 +0000 (14:24 +0200)] 
smb: check post-gap timeouts once a second at most

5 years agosmb: update ts only if it changed
Victor Julien [Sun, 17 May 2020 12:48:52 +0000 (14:48 +0200)] 
smb: update ts only if it changed

5 years agooutput/tftp: Convert to JsonBuilder 5133/head
Jeff Lucovsky [Thu, 2 Jul 2020 14:01:12 +0000 (10:01 -0400)] 
output/tftp: Convert to JsonBuilder

This commit converts the TFTP logging mechanisms to JsonBuilder.

5 years agosignature: fix linked list for bidirectional signatures
Philippe Antoine [Sat, 2 May 2020 13:55:23 +0000 (15:55 +0200)] 
signature: fix linked list for bidirectional signatures

Bidirectional signatures are really two signatures with one id
This needs to be handled with care when changing a linked list

5 years agodetect: fail properly on invalid transform pcrexform
Philippe Antoine [Fri, 19 Jun 2020 07:34:46 +0000 (09:34 +0200)] 
detect: fail properly on invalid transform pcrexform

5 years agodetect/flowbits: fix stack overflow in analyzer
Antti Tönkyrä [Fri, 26 Jun 2020 10:37:45 +0000 (10:37 +0000)] 
detect/flowbits: fix stack overflow in analyzer

Fix stack overflow in DetectFlowbitsAnalyze.

Use dynamically allocated array instead of stack and free
it after it is no longer needed.

5 years agonetflow/eve: convert to JsonBuilder 5124/head
Jason Ish [Wed, 1 Jul 2020 15:55:53 +0000 (09:55 -0600)] 
netflow/eve: convert to JsonBuilder

5 years agodoc: Correct typos 5115/head
Jeff Lucovsky [Wed, 17 Jun 2020 14:15:41 +0000 (10:15 -0400)] 
doc: Correct typos

5 years agodoc: Update byte_extract doc
Jeff Lucovsky [Wed, 17 Jun 2020 14:15:06 +0000 (10:15 -0400)] 
doc: Update byte_extract doc

5 years agodoc: Fix spelling error
Jeff Lucovsky [Fri, 12 Jun 2020 12:37:51 +0000 (08:37 -0400)] 
doc: Fix spelling error

5 years agogeneral: Fix spelling error
Jeff Lucovsky [Fri, 12 Jun 2020 12:37:23 +0000 (08:37 -0400)] 
general: Fix spelling error

5 years agodetect/content: Validate content byte array
Jeff Lucovsky [Thu, 11 Jun 2020 13:08:42 +0000 (09:08 -0400)] 
detect/content: Validate content byte array

This commit checks whether the content byte array is compatible with the
transforms, if any, for the rule.

5 years agodetect: Add transform validation api
Jeff Lucovsky [Thu, 11 Jun 2020 13:07:43 +0000 (09:07 -0400)] 
detect: Add transform validation api

This commit extends the API with a function that validates arguments
against the transforms for the SM list (if any).

5 years agodetect/transform: Add validation function
Jeff Lucovsky [Thu, 11 Jun 2020 13:05:08 +0000 (09:05 -0400)] 
detect/transform: Add validation function

This commit adds a function to pre-validate buffers. If a content
buffer contains whitespace, the validation fails.

5 years agodetect/transform: Add transform "validate" function
Jeff Lucovsky [Thu, 11 Jun 2020 12:31:55 +0000 (08:31 -0400)] 
detect/transform: Add transform "validate" function

This commit adds an (optional) entry for a validation function. The
validation function, if present, will be used during rule processing.

Its role is to determine if the arguments are compatible with the
transform. E.g., a content string of "this string has whitespace" is not
compatible with the `strip_whitespace` transform.

5 years agodhcp/eve: remove erroneous jsonbuilder close
Jason Ish [Mon, 29 Jun 2020 17:11:36 +0000 (11:11 -0600)] 
dhcp/eve: remove erroneous jsonbuilder close

The JsonBuilder was being closed to early.

5 years agojsonbuilder: add debug_validate to state
Jason Ish [Mon, 29 Jun 2020 17:10:40 +0000 (11:10 -0600)] 
jsonbuilder: add debug_validate to state

If debug validation is enabled, panic on invalid state errors.

For example, calling close on an already closed jsonbuilder
object.

5 years agorust: macro debug_validate_fail to fail with message
Jason Ish [Mon, 29 Jun 2020 17:09:16 +0000 (11:09 -0600)] 
rust: macro debug_validate_fail to fail with message

Add a new debug_validate macro that unconditionally panics
with a message. Useful in Rust pattern matching.

5 years agooutput/fileinfo: Optimize filename output
Jeff Lucovsky [Mon, 29 Jun 2020 13:54:15 +0000 (09:54 -0400)] 
output/fileinfo: Optimize filename output

This commit optimizes the JSON preparation of the file name by
eliminating the temporary copy before adding to the Json builder buffer.

5 years agooutput/rdp: Include common output options
Jeff Lucovsky [Mon, 29 Jun 2020 13:51:35 +0000 (09:51 -0400)] 
output/rdp: Include common output options

This commit will cause common metadata values and the community id to be
included in log output when configured.

5 years agooutput/dhcp: Include common output options
Jeff Lucovsky [Mon, 29 Jun 2020 13:50:53 +0000 (09:50 -0400)] 
output/dhcp: Include common output options

This commit will cause common metadata values and the community id to be
included in log output when configured.

5 years agooutput/smb: Include common output options
Jeff Lucovsky [Mon, 29 Jun 2020 13:50:21 +0000 (09:50 -0400)] 
output/smb: Include common output options

This commit will cause common metadata values and the community id to be
included in log output when configured.

5 years agooutput/tftp: Include common options
Jeff Lucovsky [Mon, 29 Jun 2020 13:48:20 +0000 (09:48 -0400)] 
output/tftp: Include common options

This commit will cause common metadata values and the community id to be
included in log output when configured.

5 years agodetect/http_raw_header: Correct type mismatch
Angelo Mirabella [Tue, 16 Jun 2020 09:04:06 +0000 (10:04 +0100)] 
detect/http_raw_header: Correct type mismatch

This changeset fixes a bug on the computation of the buffer
lenght for raw http headers. The bug is due to a mismatch
on the data type of the length (uint8_t vs uint32_t) and it
was causing signature misses.

5 years agodoc/manpage: improve intro, add examples 5110/head
Victor Julien [Sun, 14 Jun 2020 08:56:43 +0000 (10:56 +0200)] 
doc/manpage: improve intro, add examples

5 years agorule/parse: minor action parsing cleanup
Victor Julien [Sat, 13 Jun 2020 21:39:56 +0000 (23:39 +0200)] 
rule/parse: minor action parsing cleanup

5 years agodoc/manpage: add --reject-dev option
Victor Julien [Sat, 13 Jun 2020 21:36:28 +0000 (23:36 +0200)] 
doc/manpage: add --reject-dev option

5 years agodoc/userguide: update app-proto list
Victor Julien [Sat, 13 Jun 2020 21:36:13 +0000 (23:36 +0200)] 
doc/userguide: update app-proto list

5 years agodoc/userguide: list valid rule actions
Victor Julien [Sat, 13 Jun 2020 21:35:40 +0000 (23:35 +0200)] 
doc/userguide: list valid rule actions

5 years agoreject: support single vlan layer
Victor Julien [Sat, 13 Jun 2020 15:20:14 +0000 (17:20 +0200)] 
reject: support single vlan layer

Support sending RST/ICMP errors for packet with a single VLAN header.

5 years agoreject: get MTU for reject-dev and use it
Victor Julien [Fri, 12 Jun 2020 13:52:00 +0000 (15:52 +0200)] 
reject: get MTU for reject-dev and use it

5 years agoreject: minor optimization of reset entry code
Victor Julien [Fri, 12 Jun 2020 10:16:47 +0000 (12:16 +0200)] 
reject: minor optimization of reset entry code

5 years agoreject: remove L3 from function names
Victor Julien [Fri, 12 Jun 2020 10:14:01 +0000 (12:14 +0200)] 
reject: remove L3 from function names

5 years agoreject: allow configuration of the reject interface
Victor Julien [Thu, 11 Jun 2020 09:27:29 +0000 (11:27 +0200)] 
reject: allow configuration of the reject interface

Using the '--reject-dev <dev>' commandline option. This is a global option
that applies to all 'reject' actions.

If the interface specified is using ethernet, libnet will use the faster
L2 (link) layer. Suricata sets up the ethernet header based on the packet.

When the interface is specified, cache libnet_t ctx for (much) better
performance.

5 years agoreject: don't respond to tunnel packets
Victor Julien [Fri, 12 Jun 2020 13:51:30 +0000 (15:51 +0200)] 
reject: don't respond to tunnel packets

5 years agoreject: check tcp header sooner to avoid potential leak
Victor Julien [Thu, 11 Jun 2020 09:31:21 +0000 (11:31 +0200)] 
reject: check tcp header sooner to avoid potential leak

5 years agoreject: optimize and simplify run test
Victor Julien [Mon, 9 Feb 2015 07:36:07 +0000 (08:36 +0100)] 
reject: optimize and simplify run test

5 years agoreject: never return error
Victor Julien [Thu, 11 Jun 2020 07:22:10 +0000 (09:22 +0200)] 
reject: never return error

Errors by thread modules are not handled.

5 years agofile-hash-common: fix rule_file truncation
Jason Ish [Fri, 26 Jun 2020 17:45:38 +0000 (11:45 -0600)] 
file-hash-common: fix rule_file truncation

Loading file hash lists uses dirname(3) on the
de_ctx->rule_file which modifies the contents,
removing the last part of the path. So on subsequent
calls the rule_file no longer contains the rule_file,
but instead just the directory name.

Mostly noticed when using "-S" with rule files outside
of the default-rule-path which requires more hunting for
the rule file.

5 years agooutput/ftp: Use "Eve" prefix with FTP helpers
Jeff Lucovsky [Sun, 14 Jun 2020 14:17:43 +0000 (10:17 -0400)] 
output/ftp: Use "Eve" prefix with FTP helpers

This commit changes the prefix of the FTP helper routines from Json to
Eve.

5 years agooutput/eve: Remove unused helper function
Jeff Lucovsky [Sat, 6 Jun 2020 18:06:43 +0000 (14:06 -0400)] 
output/eve: Remove unused helper function

This commit removes an unused helper function no longer required/used
after conversion to JsonBuilder.

5 years agoftp/eve: Convert FTP logging to use JsonBuilder
Jeff Lucovsky [Sat, 6 Jun 2020 18:05:39 +0000 (14:05 -0400)] 
ftp/eve: Convert FTP logging to use JsonBuilder

This commit converts the FTP logging mechanisms to use JsonBuilder.

5 years agosmb/eve: convert to jsonbuilder
Shivani Bhardwaj [Sat, 6 Jun 2020 16:37:01 +0000 (22:07 +0530)] 
smb/eve: convert to jsonbuilder

Closes redmine ticket 3712.

5 years agooutput/anomaly: Use helpers for string output
Jeff Lucovsky [Fri, 12 Jun 2020 14:13:10 +0000 (10:13 -0400)] 
output/anomaly: Use helpers for string output

5 years agooutput/flow: Use helpers for string output
Jeff Lucovsky [Fri, 12 Jun 2020 14:12:15 +0000 (10:12 -0400)] 
output/flow: Use helpers for string output

5 years agooutput/json: Include fileinfo in alerts
Jeff Lucovsky [Thu, 4 Jun 2020 12:37:12 +0000 (08:37 -0400)] 
output/json: Include fileinfo in alerts

This commit adds fileinfo to alerts when `metadata` is configured.

5 years agojson: macro for setting formatted false value
Jeff Lucovsky [Sat, 13 Jun 2020 12:08:28 +0000 (08:08 -0400)] 
json: macro for setting formatted false value

5 years agooutput/json: Refactor file output helper
Jeff Lucovsky [Thu, 4 Jun 2020 11:45:05 +0000 (07:45 -0400)] 
output/json: Refactor file output helper

This commit creates a common file output helper function based on the
logic in output-file-info.c:BuildBuildFileInfoRecord

The refactored helper will be used to create "fileinfo" information
during the alert output path.

5 years agoutil: check if parsed data is in range 5101/head
Shivani Bhardwaj [Wed, 17 Jun 2020 13:11:51 +0000 (18:41 +0530)] 
util: check if parsed data is in range

5 years agosrc: remove multiple uses of atoi
Shivani Bhardwaj [Sat, 21 Dec 2019 08:37:58 +0000 (14:07 +0530)] 
src: remove multiple uses of atoi

atoi() and related functions lack a mechanism for reporting errors for
invalid values. Replace them with calls to the appropriate
ByteExtractString* and StringParse* functions.

Partially closes redmine ticket #3053.

5 years agoaffinity: Convert nb_threads to uint32_t
Shivani Bhardwaj [Sat, 20 Jun 2020 14:39:17 +0000 (20:09 +0530)] 
affinity: Convert nb_threads to uint32_t

5 years agonapatech: make stream_id uint8_t
Shivani Bhardwaj [Fri, 26 Jun 2020 06:59:23 +0000 (12:29 +0530)] 
napatech: make stream_id uint8_t

5 years agoredis: Change port type to uint16_t
Shivani Bhardwaj [Tue, 12 May 2020 18:50:37 +0000 (00:20 +0530)] 
redis: Change port type to uint16_t

5 years agorust: lock to nom 5.1.1 5077/head
Jason Ish [Tue, 16 Jun 2020 14:04:49 +0000 (08:04 -0600)] 
rust: lock to nom 5.1.1

5.1.2 pulls in dependencies that don't build on Rust 1.34.

5 years agoapp-layer: remove old MPMId API calls 5059/head
Victor Julien [Tue, 26 May 2020 08:35:34 +0000 (10:35 +0200)] 
app-layer: remove old MPMId API calls

Had been deprecated and non-functional since 2017.

5 years agojson: macros for setting formatted true and string values
Jason Ish [Mon, 8 Jun 2020 18:28:02 +0000 (12:28 -0600)] 
json: macros for setting formatted true and string values

JB_SET_TRUE(jb, key), and JB_SET_STRING(string, key, val) are C macros
around jb_set_formatted to set static string and true values as a
(micro) optimization.

5 years agojsonbuilder: setter for formatted data
Jason Ish [Mon, 8 Jun 2020 18:27:05 +0000 (12:27 -0600)] 
jsonbuilder: setter for formatted data

Create a method to set preformatted data that contains the key
and the value already formatted.

This is an optimization for static data.

5 years agojsonbuilder: export {set,append}_string_from_bytes to C
Jason Ish [Mon, 8 Jun 2020 17:11:28 +0000 (11:11 -0600)] 
jsonbuilder: export {set,append}_string_from_bytes to C

5 years agojsonbuilder: use Box::from_raw instead of transmute to free
Jason Ish [Mon, 8 Jun 2020 16:57:00 +0000 (10:57 -0600)] 
jsonbuilder: use Box::from_raw instead of transmute to free

I think this is a bad use of transmute, while the end result
is the same, Box::from_raw is more correct as we created this
pointer with Box::into_raw.

5 years agosignature: adds file flag for file_data keyword
Philippe Antoine [Fri, 1 May 2020 08:54:51 +0000 (10:54 +0200)] 
signature: adds file flag for file_data keyword

So that SigValidate can check if a protocol not supporting
files was set after this keyword

5 years agossh/eve: convert to jsonbuilder
Philippe Antoine [Sat, 6 Jun 2020 20:02:26 +0000 (22:02 +0200)] 
ssh/eve: convert to jsonbuilder

5 years agodoc: Improve tos description 5047/head
Jeff Lucovsky [Sat, 2 May 2020 14:09:12 +0000 (10:09 -0400)] 
doc: Improve tos description

This commit improves the description of the `tos` keyword by emphasizing
that the value used should adhere to the guidelines in RFC2474. Instead
of specifying the DSCP value directly, right shift the DSCP value and
use that.