bitkeks / python-netflow-v9-softflowd

PyPI "netflow" package. NetFlow v9 parser, collector and analyzer implemented in Python 3. Developed and tested with softflowd
https://bitkeks.eu/blog/2016/08/collecting-netflow-v9-on-openwrt.html
MIT License
110 stars 56 forks source link

Incorrect clearing of Enterprise flag bit #43

Closed GitOldGrumpy closed 1 year ago

GitOldGrumpy commented 2 years ago

It looks to me that the enterprise flag bit is incorrectly cleared. Looking at line 957 in ipfix.py it clears the 7th bit when according to the spec the enterprise flag is the 15th bit.

The flag is first checked on line 953 using the 7th bit because it is working on a byte, it then unpacks a short moving the flag to the 15th bit.

bitkeks commented 1 year ago

Yep, you are right. Missed this one, because it's a byte at first and then two bytes. Fixed in #44, thanks!