On Sat, Mar 27, 2021 at 03:20:05PM +0000, Simon Marsh wrote:
Hi,
i run bird as a route collector in DN42 and so get a variety of different BGP daemons peering with and passing routes to the collector. We recently ran in to an issue where MRT dumps from bird were not readable by any of the common MRT parsers and, on investigation, found a bug in how bird handles the BGP Path Attribute Extended Length flag.
The issue occurred because peers using the FRR daemon set the Extended Length flag on the AS PATH attribute by default, regardless of the actual data length. When bird re-encodes the AS Path (for example as part of the MRT dump) it correctly re-calculates whether to use an 8 bit or 16 bit length field for the attribute, but simply copies the flags and does not reset the Extended Length flag in the 8 bit case. This results in an AS PATH attribute being output that has the Extended Length flag set but with the actual length field being only 8 bits. Of course, any parsers trying read this get very confused.
Hi You are right. Will merge that. I wondered why this issue did not manifest during regular route propagation and that is because attributes are normalized during route export to BGP (but not during MRT table dump). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."