mikemiles-dev / netflow_parser

netflow_parser
Apache License 2.0
9 stars 4 forks source link

unwrap panic in IPFIX parse_options_template #27

Closed karel-un closed 8 months ago

karel-un commented 8 months ago

We have several Mikrotik devices sending IPFIX data and after some time (few seconds to few minutes) they probably send wrong IPFIX template, which results in panic in unwrap:

https://github.com/mikemiles-dev/netflow_parser/blob/ad41358d0c21eeaf3c997dd8f90070a9d35412d6/src/variable_versions/ipfix.rs#L175

Replacing unwrap with ? seems to fix this.

mikemiles-dev commented 8 months ago

This should be a ? and not an unwrap(). I will make a branch fix in an hour and publish a new cargo package. Good catch.