Skip to content

Commit

Permalink
Fix test. After while loop there should be 2 spaces, not 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Shelton authored and julthomas committed Nov 25, 2017
1 parent 2931201 commit 6f694b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -3018,6 +3018,8 @@ PARSER_Parse(Repeat)
r, npb->parsedTo, json_object_to_json_string(parsed_value));

if(r != 0) {
json_object_put(parsed_value);
parsed_value = NULL;
if(data->permitMismatchInParser) {
strtoffs = lastKnownGood; /* go back to final match */
LN_DBGPRINTF(npb->ctx, "mismatch in repeat, "
Expand Down
2 changes: 1 addition & 1 deletion tests/repeat_mismatch_in_while.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ assert_output_json_eq '{ "originalmsg": "Aug 18 13:18:45 192.168.99.2 %ASA-6-106
reset_rules
add_rule 'version=2'
add_rule 'prefix=%timestamp:date-rfc3164% %hostname:word%'
add_rule 'rule=cisco,fwblock: \x25ASA-6-106015\x3a Deny %proto:word% (no connection) from %source:cisco-interface-spec% to %dest:cisco-interface-spec% flags %flags:repeat{ "option.permitMismatchInParser":true, "parser": {"type":"word", "name":"."}, "while":{"type":"literal", "text":" "} }%\x20 on interface %srciface:word%'
add_rule 'rule=cisco,fwblock: \x25ASA-6-106015\x3a Deny %proto:word% (no connection) from %source:cisco-interface-spec% to %dest:cisco-interface-spec% flags %flags:repeat{ "option.permitMismatchInParser":true, "parser": {"type":"word", "name":"."}, "while":{"type":"literal", "text":" "} }%\x20 on interface %srciface:word%'

echo step 2
execute 'Aug 18 13:18:45 192.168.99.2 %ASA-6-106015: Deny TCP (no connection) from 173.252.88.66/443 to 76.79.249.222/52746 flags RST on interface outside'
Expand Down

0 comments on commit 6f694b9

Please sign in to comment.