The YAML spec considers duplicate keys to be an error, as do some YAML
implementations, most notably Rust's serde_yaml which would be nice to
use in the future.
Multiple include lines at the same level will still work, but a warning
will be emitted.
These can be fixed by moving to an "include" array:
include:
- file1.yaml
- file2.yaml
Ticket: #5939
int seq_idx = 0;
int retval = 0;
int was_empty = -1;
+ int include_count = 0;
if (rlevel++ > RECURSION_LIMIT) {
SCLogError("Recursion limit reached while parsing "
if (strcmp(value, "include") == 0) {
state = CONF_INCLUDE;
+ if (++include_count > 1) {
+ SCLogWarning("Multipline \"include\" fields at the same level are "
+ "deprecated and will not work in Suricata 8, please move "
+ "to an array of include files: line: %zu",
+ parser->mark.line);
+ }
goto next;
}