[BGPCEP-317] UPDATE message sent by controller to BGP peer has incorrect Total path attribute length (should not cover the NLRI bytes) Created: 26/Nov/15  Updated: 03/Mar/19  Resolved: 01/Dec/15

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration

Type: Bug
Reporter: Radovan Sajben Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4681

 Description   

UPDATE message sent by controller to BGP peer intended for the 8.0.1.32/28 prefix introduction has incorrect Total path attribute length (it should not cover the NLRI bytes)

bgp peer log (play.py)

2015-11-26 11:27:48,888 DEBUG: UPDATE message received: 0xffffffffffffffffffffffffffffffff004b020000003440010100400200800404000000004005040000006480090429292929800a0428282828800e0e00010104c0000201001c08000120
2015-11-26 11:27:48,888 DEBUG: Decoding update message:
2015-11-26 11:27:48,888 DEBUG: Message header marker: 0xffffffffffffffffffffffffffffffff
2015-11-26 11:27:48,888 DEBUG: Message lenght: 0x004b (75)
2015-11-26 11:27:48,888 DEBUG: Message type: 0x02 (update)
2015-11-26 11:27:48,888 DEBUG: Withdrawn routes lenght: 0x0000 (0)
2015-11-26 11:27:48,888 DEBUG: Withdrawn routes: 0x
2015-11-26 11:27:48,889 DEBUG: Withdrawn routes prefix list: []
2015-11-26 11:27:48,889 DEBUG: Total path attribute lenght: 0x0034 (52)
2015-11-26 11:27:48,889 DEBUG: Path attributes: 0x40010100400200800404000000004005040000006480090429292929800a0428282828800e0e00010104c0000201001c08000120
2015-11-26 11:27:48,889 DEBUG: Calculated NLRI length: 0
2015-11-26 11:27:48,889 DEBUG: NLRI: 0x
2015-11-26 11:27:48,889 DEBUG: NLRI prefix list: []

karaf log for distribution-karaf-0.3.2-Lithium-SR2 temporary at https://jenkins.opendaylight.org/sandbox/job/bgpcep-csit-1node-userfeatures-only-stable-lithium/19/artifact/karaf.log

from https://tools.ietf.org/html/rfc4271#page-15

-----------------------------------------------------

Withdrawn Routes Length (2 octets)

-----------------------------------------------------

Withdrawn Routes (variable)

-----------------------------------------------------

Total Path Attribute Length (2 octets)

-----------------------------------------------------

Path Attributes (variable)

-----------------------------------------------------

Network Layer Reachability Information (variable)

-----------------------------------------------------

...

Total Path Attribute Length:

This 2-octet unsigned integer indicates the total length of the
Path Attributes field in octets. Its value allows the length
of the Network Layer Reachability field to be determined as
specified below.

...

Network Layer Reachability Information:

This variable length field contains a list of IP address
prefixes. The length, in octets, of the Network Layer
Reachability Information is not encoded explicitly, but can be
calculated as:

UPDATE message Length - 23 - Total Path Attributes Length

  • Withdrawn Routes Length


 Comments   
Comment by Milos Fabian [ 01/Dec/15 ]

BGP Multi-Protocol (IPv4 Unicast) peering is enabled, routing information is carried in the Path Attribute "MP_REACH_NLRI", therefore this payload must counted to overall path attribute length.
Ref.: https://tools.ietf.org/html/rfc4760#section-3

Generated at Wed Feb 07 19:12:41 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.