-
Bug
-
Resolution: Unresolved
-
High
-
None
-
None
-
None
Unrecognized BGP attributes accumulated and propagated into next BGP update messages.
When BGP update messages contain unrecognized attributes, they are accumulated in the org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleAttributeRegistry and parsing process is failed with exception like following:
Could not parse BGP attributes. Caused by: java.lang.IllegalArgumentException: Multiple entries with same key: UnrecognizedAttributesKey{_type=32}=UnrecognizedAttributes{_type=32, _value=[*], _partial=true, _transitive=true, augmentation=[]} and UnrecognizedAttributesKey{_type=32}=UnrecognizedAttributes{_type=32, _value=[*], _partial=true, _transitive=true, augmentation=[]}. To index multiple values under a key, use Multimaps.index.
This happens due to org.opendaylight.protocol.bgp.parser.spi.pojo.SimpleAttributeRegistry#unrecognizedAttributes list has to be local variable or flushed between messages parsing.
Also the library doesn't support duplicate attributes: unrecognized or recognized.
Unrecognized attributes can't be duplicated due to AttributesBuilder doesn't allow unrecognizedAttributes with same keys (doesn't use mulimap).
Recognized attributes can't be duplicated, due to SimpleAttributeRegistry doesn't ignore duplicate attributes correctly: attribute skipped, but bytes aren't. So next attribute is read from the incorrect byte buffer position.
org.opendaylight.bgpcep:bgp-parser-spi:0.14.1