Edgio/vflow

Invalid decoding of Options-Template in IPFix

bdollma opened this issue · 1 comments

Hi,
Trying to decode a simple options template with more than 1 scope field and failing.
The reason is the following line:

https://github.com/VerizonDigital/vflow/blob/b7cc5a3b5454b09ff915e07d36a225cf7588689a/ipfix/decoder.go#L470

Instead it should be:

tr.ScopeFieldSpecifiers = append(tr.ScopeFieldSpecifiers, tf)

I think the fix is self explanatory.

The same bug exists in Netflow v9 decoder as well.

The following line:

https://github.com/VerizonDigital/vflow/blob/b7cc5a3b5454b09ff915e07d36a225cf7588689a/netflow/v9/decoder.go#L304

should be replace with:

tr.ScopeFieldSpecifiers = append(tr.ScopeFieldSpecifiers, tf)