Make parsing of booleans a little bit more lenient.

This makes the input framework (and everything else that uses the Ascii
parser) accept 0 and 1 as valid values for booleans.
This commit is contained in:
Johanna Amann 2018-01-18 11:09:12 -08:00
parent ff22230a73
commit 116079a9ad
4 changed files with 7 additions and 6 deletions

View file

@ -7,9 +7,9 @@ redef exit_only_after_terminate = T;
@TEST-START-FILE input.log
#separator \x09
#path ssh
#fields b i e c p pp sn a d t iv s sc ss se vc ve ns
#fields b bt i e c p pp sn a d t iv s sc ss se vc ve ns
#types bool int enum count port port subnet addr double time interval string table table table vector vector string
T -42 SSH::LOG 21 123 5/icmp 10.0.0.0/24 1.2.3.4 3.14 1315801931.273616 100.000000 hurz 2,4,1,3 CC,AA,BB EMPTY 10,20,30 EMPTY 4242
T 1 -42 SSH::LOG 21 123 5/icmp 10.0.0.0/24 1.2.3.4 3.14 1315801931.273616 100.000000 hurz 2,4,1,3 CC,AA,BB EMPTY 10,20,30 EMPTY 4242
@TEST-END-FILE
@load base/protocols/ssh
@ -26,6 +26,7 @@ type Idx: record {
type Val: record {
b: bool;
bt: bool;
e: Log::ID;
c: count;
p: port;