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
InformationElement and InformationElementList hashing, comparison, and for_length() bugs #48
Pre-existing 0.9 bugs in ipfix/ie.py and ipfix/types.py (fixed in #34):
InformationElement.__hash__() included self.length while __eq__() compared only (self.pen, self.num), violating a == b => hash(a) == hash(b) for reduced-length-encoded IEs in sets and dicts.
InformationElementList.__hash__() crashed with TypeError on empty lists (reduce(operator.xor, [])), was order-insensitive ([a, b] collided with [b, a] and [a, a] cancelled to 0), and treated hash 0 as uncached (if not self.hashcache:).
InformationElement.for_length() dropped custom valstr and valparse overrides when creating a resized IE.
__eq__() and __lt__() on InformationElement, InformationElementList, and IpfixType accessed attributes on other unconditionally and raised AttributeError instead of returning NotImplemented against unrelated types.
Activity