Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

peer shows error when adding route that includes NS flag #1101

Closed
enag11 opened this issue Jun 16, 2022 · 1 comment
Closed

peer shows error when adding route that includes NS flag #1101

enag11 opened this issue Jun 16, 2022 · 1 comment
Assignees
Labels

Comments

@enag11
Copy link

enag11 commented Jun 16, 2022

Using 4.2.18
sending flowspec route announcement to an exabgp4 peer and a IOS/XR route reflector.

announce_flow_1 = 'announce flow route { match { source 1.1.1.1/32; destination 2.2.2.2/32; protocol tcp; tcp-flags [ns]; } }'

The sender show:

16:53:09 | 21777  | process       | command from process announce-routes : announce flow route { match { source 1.1.1.1/32; destination 2.2.2.2/32; protocol tcp; tcp-flags [ns    ]; } }
16:53:09 | 21777  | reactor       | async | announce-routes | announce flow route { match { source 1.1.1.1/32; destination 2.2.2.2/32; protocol tcp; tcp-flags [ ns ]; } }
16:53:09 | 21777  | configuration | > route            |
16:53:09 | 21777  | configuration | > match            |
16:53:09 | 21777  | configuration | . source           | '1.1.1.1/32'
16:53:09 | 21777  | configuration | . destination      | '2.2.2.2/32'
16:53:09 | 21777  | configuration | . protocol         | 'tcp'
16:53:09 | 21777  | configuration | . tcp-flags        | '[' 'ns' ']'
16:53:09 | 21777  | configuration | < match            |
16:53:09 | 21777  | configuration | < route            |
16:53:09 | 21777  | api           | flow added to neighbor 198.18.18.114 local-ip 198.18.18.170 local-as 100 peer-as 100 router-id 198.18.18.170 family-allowed in-open, neighbor 198.18.18.90 local-ip 198.18.18.170 local-as 100 peer-as 100 router-id 198.18.18.170 family-allowed in-open : flow destination-ipv4 2.2.2.2/32 source-ipv4 1.1.1.1/32 protocol =tcp tcp-flags ns
16:53:09 | 21777  | outgoing-1    | sending TCP payload (  65) FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0041 0200 0000 2A40 0101 0040 0200 4005 0400 0000 6480 0E19 0001 8500 0013 0120 0202 0202 0220 0101 0101 0381 0609 9001 00
16:53:09 | 21777  | outgoing-1    | >> 1 UPDATE(s)
16:53:09 | 21777  | outgoing-1    | sending TCP payload (  65) FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0041 0200 0000 2A40 0101 0040 0200 4005 0400 0000 6480 0E19 0001 8500 0013 0120 0202 0202 0220 0101 0101 0381 0609 9001 00
16:53:09 | 21777  | outgoing-1    | >> 1 UPDATE(s)
16:53:09 | 21777  | outgoing-1    | received complete TCP payload (  19) FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 003E 03
16:53:09 | 21777  | outgoing-1    | received complete TCP payload (  43) 0100 6361 6E20 6E6F 7420 6465 636F 6465 2075 7064 6174 6520 6D65 7373 6167 6520 6F66 2074 7970 6520 2232 22
16:53:09 | 21777  | outgoing-1    | << message of type NOTIFICATION
16:53:09 | 21777  | outgoing-1    | peer reset, message [notification received (1,0)] error[Message header error / Unspecific / can not decode update message of type "2"]
16:53:09 | 21777  | outgoing-1    | outgoing-1 198.18.18.170-198.18.18.114, closing connection

The IOS/XR added the route

iDest:2.2.2.2/32,Source:1.1.1.1/32,Proto:=6,TCPFlags:~0x0100/152
                      0.0.0.0                       100      0 i

exabgp4 peer shows the following error

16:53:09 | 21464  | incoming-1    | received complete TCP payload (  19) FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0041 02
16:53:09 | 21464  | incoming-1    | received complete TCP payload (  46) 0000 002A 4001 0100 4002 0040 0504 0000 0064 800E 1900 0185 0000 1301 2002 0202 0202 2001 0101 0103 8106 0990 0100
16:53:09 | 21464  | incoming-1    | << message of type UPDATE
16:53:09 | 21464  | parser        | parsing UPDATE (  46) 0000 002A 4001 0100 4002 0040 0504 0000 0064 800E 1900 0185 0000 1301 2002 0202 0202 2001 0101 0103 8106 0990 0100
16:53:09 | 21464  | routes        | withdrawn NLRI none
16:53:09 | 21464  | parser        | attribute origin             flag 0x40 type 0x01 len 0x01 payload 00
16:53:09 | 21464  | parser        | attribute as-path            flag 0x40 type 0x02 len 0x00
16:53:09 | 21464  | parser        | attribute local-preference   flag 0x40 type 0x05 len 0x04 payload 0000 0064
16:53:09 | 21464  | parser        | attribute mp-reach-nlri      flag 0x80 type 0x0e len 0x19 payload 0001 8500 0013 0120 0202 0202 0220 0101 0101 0381 0609 9001 00
16:53:09 | 21464  | parser        | NLRI      ipv4 flow          without path-information     payload 1301 2002 0202 0202 2001 0101 0103 8106 0990 0100
16:53:09 | 21464  | incoming-1    | could not decode message "2"
16:53:09 | 21464  | incoming-1    | ord() expected a character, but string of length 2 found
16:53:09 | 21464  | incoming-1    | Traceback (most recent call last):
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/reactor/protocol.py", line 240, in read_message
16:53:09 | 21464  | incoming-1    |     message = Message.unpack(msg_id, body, Direction.IN, self.negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/message.py", line 180, in unpack
16:53:09 | 21464  | incoming-1    |     return cls.klass(message).unpack_message(data, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/__init__.py", line 235, in unpack_message
16:53:09 | 21464  | incoming-1    |     attributes = Attributes.unpack(_attributes, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/attribute/attributes.py", line 293, in unpack
16:53:09 | 21464  | incoming-1    |     attributes = cls().parse(data, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/attribute/attributes.py", line 389, in parse
16:53:09 | 21464  | incoming-1    |     return self.parse(left, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/attribute/attributes.py", line 389, in parse
16:53:09 | 21464  | incoming-1    |     return self.parse(left, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/attribute/attributes.py", line 389, in parse
16:53:09 | 21464  | incoming-1    |     return self.parse(left, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/attribute/attributes.py", line 375, in parse
16:53:09 | 21464  | incoming-1    |     decoded = Attribute.unpack(aid, flag, attribute, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/attribute/attribute.py", line 286, in unpack
16:53:09 | 21464  | incoming-1    |     instance = cls.klass(attribute_id, flag).unpack(data, direction, negotiated)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/attribute/mprnlri.py", line 200, in unpack
16:53:09 | 21464  | incoming-1    |     nlri, left = NLRI.unpack_nlri(afi, safi, data, IN.ANNOUNCED, addpath)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/nlri/nlri.py", line 110, in unpack_nlri
16:53:09 | 21464  | incoming-1    |     return cls.registered_nlri[key].unpack_nlri(a, s, data, action, addpath)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/nlri/flow.py", line 706, in unpack_nlri
16:53:09 | 21464  | incoming-1    |     adding = klass.decoder(value)
16:53:09 | 21464  | incoming-1    |   File "/home/og1939/exabgp-4.2.18/lib/exabgp/bgp/message/update/nlri/flow.py", line 322, in _inner
16:53:09 | 21464  | incoming-1    |     return klass(function(value))
16:53:09 | 21464  | incoming-1    | TypeError: ord() expected a character, but string of length 2 found
16:53:09 | 21464  | incoming-1    |
16:53:09 | 21464  | incoming-1    | sending TCP payload (  62) FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF 003E 0301 0063 616E 206E 6F74 2064 6563 6F64 6520 7570 6461 7465 206D 6573 7361 6765 206F 6620 7479 7065 2022 3222
16:53:09 | 21464  | incoming-1    | >> NOTIFICATION (1,0,"can not decode update message of type "2"")
16:53:09 | 21464  | incoming-1    | peer reset, message [notification sent (1,0)] error[Message header error / Unspecific / can not decode update message of type "2"]
16:53:09 | 21464  | incoming-1    | incoming-1 198.18.18.170-198.18.18.114, closing connection
@enag11
Copy link
Author

enag11 commented Jun 17, 2022

Great, thanks, I will try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants