mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
parent
0e97c29eb8
commit
e5d9a715ce
4 changed files with 15 additions and 3 deletions
|
@ -2417,8 +2417,16 @@ Val* Manager::ValueToVal(const Stream* i, const Value* val, Type* request_type,
|
||||||
zeek_int_t index = request_type->AsEnumType()->Lookup(module, var.c_str());
|
zeek_int_t index = request_type->AsEnumType()->Lookup(module, var.c_str());
|
||||||
if ( index == -1 )
|
if ( index == -1 )
|
||||||
{
|
{
|
||||||
Warning(i, "Value '%s' for stream '%s' is not a valid enum.", enum_string.c_str(),
|
auto source = i->reader->Info().source;
|
||||||
i->name.c_str());
|
auto file_pos = val->GetFileLineNumber();
|
||||||
|
|
||||||
|
const char* warning = zeek::util::fmt(
|
||||||
|
"Value '%s' for stream '%s' is not a valid enum.", enum_string.c_str(),
|
||||||
|
i->name.c_str());
|
||||||
|
if ( source && file_pos != -1 )
|
||||||
|
Warning(i, "%s, line %d: %s", source, file_pos, warning);
|
||||||
|
else
|
||||||
|
Warning(i, "%s", warning);
|
||||||
|
|
||||||
have_error = true;
|
have_error = true;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -5,6 +5,8 @@ error: ../input.log/Input::READER_ASCII: ../input.log, line 5: Init failed
|
||||||
error: ../input.log/Input::READER_ASCII: ../input.log, line 5: Not enough fields in line 'T -41 SSH::LOG 21 123 tcp 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' of ../input.log. Found 15 fields, want positions 17 and -1
|
error: ../input.log/Input::READER_ASCII: ../input.log, line 5: Not enough fields in line 'T -41 SSH::LOG 21 123 tcp 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' of ../input.log. Found 15 fields, want positions 17 and -1
|
||||||
error: ../input.log/Input::READER_ASCII: ../input.log, line 5: terminating thread
|
error: ../input.log/Input::READER_ASCII: ../input.log, line 5: terminating thread
|
||||||
received termination signal
|
received termination signal
|
||||||
|
warning: ../input.log, line 10: Value 'EMPTY' for stream 'ssh' is not a valid enum.
|
||||||
|
warning: ../input.log, line 11: Value '' for stream 'ssh' is not a valid enum.
|
||||||
warning: ../input.log/Input::READER_ASCII: ../input.log, line 5: Not enough fields in line 'T -41 SSH::LOG 21 123 tcp 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' of ../input.log. Found 15 fields, want positions 17 and -1
|
warning: ../input.log/Input::READER_ASCII: ../input.log, line 5: Not enough fields in line 'T -41 SSH::LOG 21 123 tcp 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' of ../input.log. Found 15 fields, want positions 17 and -1
|
||||||
warning: ../input.log/Input::READER_ASCII: ../input.log, line 7: Tried to parse invalid/unknown protocol: whatever
|
warning: ../input.log/Input::READER_ASCII: ../input.log, line 7: Tried to parse invalid/unknown protocol: whatever
|
||||||
warning: ../input.log/Input::READER_ASCII: ../input.log, line 8: Bad address: 342.2.3.4
|
warning: ../input.log/Input::READER_ASCII: ../input.log, line 8: Bad address: 342.2.3.4
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
warning: Value 'IdoNot::Exist' for stream 'enum' is not a valid enum.
|
warning: ../input.log, line 2: Value 'IdoNot::Exist' for stream 'enum' is not a valid enum.
|
||||||
received termination signal
|
received termination signal
|
||||||
|
|
|
@ -17,6 +17,8 @@ T -42 SSH::LOG 21 123 tcp 10.0.0.0/24 1.2.3.4 3.14 1315801931.273616 100.000000
|
||||||
T -43 SSH::LOG 21 123 whatever 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 HOHOHO
|
T -43 SSH::LOG 21 123 whatever 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 HOHOHO
|
||||||
T -44 SSH::LOG 21 123 udp 10.0.0.0/24 342.2.3.4 3.14 1315801931.273616 100.000000 hurz 2,4,1,3 CC,AA,BB EMPTY 10,20,30 EMPTY 4242 HOHOHO
|
T -44 SSH::LOG 21 123 udp 10.0.0.0/24 342.2.3.4 3.14 1315801931.273616 100.000000 hurz 2,4,1,3 CC,AA,BB EMPTY 10,20,30 EMPTY 4242 HOHOHO
|
||||||
T -41
|
T -41
|
||||||
|
T -41 EMPTY 21 123 tcp 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 -41 21 123 tcp 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
|
@TEST-END-FILE
|
||||||
|
|
||||||
@load base/protocols/ssh
|
@load base/protocols/ssh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue