Skip to content

Regression in BGP flow spec generation code with ports, destination ports, source ports and packet-length #753

Description

@pavel-odintsov

Hello!

I've found regression in BGP flow spec generation code with ports, destination ports, source ports and packet-length.

Each of this announces could not be parsed with ExaBGP with following message:

Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        | could not parse the message
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        | Traceback (most recent call last):
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/configuration/check.py", line 240, in check_update
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     update = Update.unpack_message(injected,negotiated)
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/__init__.py", line 263, in unpack_message
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     attributes = Attributes.unpack(_attributes,negotiated)
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/attribute/attributes.py", line 266, in unpack
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     attributes = cls().parse(data,negotiated)
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/attribute/attributes.py", line 324, in parse
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     return self.parse(left,negotiated)
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/attribute/attributes.py", line 323, in parse
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     self.add(Attribute.unpack(aid,flag,attribute,negotiated))
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/attribute/attribute.py", line 237, in unpack
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     instance = cls.klass(attribute_id,flag).unpack(data,negotiated)
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/attribute/mprnlri.py", line 194, in unpack
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     nlri,left = NLRI.unpack_nlri(afi,safi,data,IN.ANNOUNCED,addpath)
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/nlri/nlri.py", line 102, in unpack_nlri
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     return cls.registered_nlri[key].unpack_nlri(afi,safi,data,action,addpath)
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |   File "/opt/dps/libraries/exabgp_git/lib/exabgp/bgp/message/update/nlri/flow.py", line 616, in unpack_nlri
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        |     raise Notify(3,10,'invalid length at the start of the the flow')
Tue, 08 Mar 2016 18:18:59 | INFO     | 24324  | parser        | Notify: UPDATE message error / Invalid Network Field / invalid length at the start of the the flow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions