You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NetFlow v9 PduBuffer and TimeAdapter 0.9 crashes and 1000x timestamp unit bug #52
Pre-existing 0.9 bugs in ipfix/v9pdu.py and ipfix/template.py (distinct from #42, fixed in #34):
TimeAdapter divided SysUpTime by 1000 and passed seconds to types._decode_msec() (which expects milliseconds), shifting timestamps by 1000x into dates near 1970; TimeAdapter.namedict_iterator() also crashed with NameError (ienames).
PduBuffer.tuple_iterator() crashed on Python 3 with NameError because reduce was never imported in ipfix/v9pdu.py.
PduBuffer.__repr__() crashed with NameError (addinf undefined), and PduBuffer.__init__() initialized self.base_epoch instead of self.basetime_epoch.
Template-key arity mismatches: PduBuffer.active_template_ids() checked k[0:1] == (self.sesid, self.odid) (always False because a 1-element slice cannot equal a 2-tuple) and yielded odid instead of tid; accepted_tids and _recache_accepted_tids() used 2-tuples (odid, tid) against 3-tuple (sesid, odid, tid) keys in self.templates, raising KeyError.
SinglePduBuffer lacked short-PDU and EOF bounds checks (struct.error instead of EOFError/IpfixDecodeError), StreamPduBuffer.next_set() crashed on EOF or short reads immediately after reading a PDU header, and decode_template_from() did not reject the enterprise bit in NetFlow v9 templates.
Activity