mikemiles-dev / netflow_parser

netflow_parser
Apache License 2.0
9 stars 4 forks source link

Fix parsing flowsets #23

Closed mikhailzagurskiy closed 10 months ago

mikhailzagurskiy commented 10 months ago

Found out, that real netflow can't be parsed without unnecessary error. If there are template FlowSet along with data FlowSet, there is a bug: parser expects the same number of flowsets as in the header.count, but it's incorrect.

On documentation in Figure 2 we can see the example of netflow packet consists of template and data flowset. Header.count here shows the number of data flows + template flow.

Wireshark with netflow data analysis shows the same behaviour.

I slightly changed parse method of flowsets to achieve the same result