Open aumisb opened 4 years ago
Hello @aumisb,
thanks for the bug report! This seems to be a similar case as in #17, where FIRST_SWITCHED
and LAST_SWITCHED
also were the causes of errors. Guess we'll have to remove the fields.
I have not debugged with a raw hex dump, but can if you want me to.
This would greatly improve the debugging! It should be fairly simple to check what field types (integers) are used for the values, but are not resolved to *_SWITCHED
. If you could find out what the keys for first
and last
are in your example above, that would really help!
As a side note, I just saw that the usage of UNKNOWN_FIELD_TYPE
(Reference) is wrong. As soon as more than one field type is not recognized, the default fallback key UNKNOWN_FIELD_TYPE
would be overwritten, dropping the previous value. This should be fixed.
I have softflowd (softflowd-1.0.0) running in my pfsense box with "Flow Tracking Level" set to Full and the "Netflow Version" set to 9. When I use
nfcapd
to capture packets and inspect them usingnfdump
, I see expected results. An example flow record is shown below.However, when running the collector and analyzer with the same softflowd settings, I am getting an error:
Inspecting an element in the
flows
list in analyzer.py, the collected flows are missing keys (see below). TheUNKNOWN_FIELD_TYPE
may be one of eitherFIRST_SWITCHED
orLAST_SWITCHED
Since
nfcapd
is capturing theFIRST_SWITCHED
andLAST_SWITCHED
fields and this library isn't, could there be an issue with parsing somewhere? I have not debugged with a raw hex dump, but can if you want me to.