BMP Adj-RIB-Out post-policy support

admin at nxthdr.dev admin at nxthdr.dev
Thu Jan 15 11:50:44 CET 2026


Dear Maria,

Thanks a lot for the review and for the pointers!

Indeed, my initial patch is wrong. I was sourcing updates from the main table, which effectively means I was exporting the RIB as updates and calling that ADJ-RIB-Out.

I tried to fix the implementation to use the actual out_table, but I kept running into crashes. From what I can tell, this is because the out table is an internal table and I didn’t manage to correctly create or attach a channel to it without hitting invalid states.

Given your comment about thread-next handling out_table very differently, I wondered whether it might make more sense to target that branch instead. Before going further in that direction, I wanted to double-check that BMP ADJ-RIB-In Route Monitoring was working properly there first.

I had a suspicion it wasn’t, since I had already tested early BIRD v3 releases back when they came out and saw issues at the time (mentioned it on the mailing list but that was a busy period). After retesting, it turns out ADJ-RIB-In RM was indeed broken: my collector was only receiving End-of-RIB messages, with no actual route updates.

Since I had a good test setup handy, I dug into it and found a few issues that prevented IPv4 and IPv6 updates from being sent as BMP Route Monitoring messages. Here is the result:

https://github.com/matthieugouel/bird/commit/835ea3fae7f162105621bd773a078bd7ad36ec4d

I compared the BMP output against BIRD v2 and got matching behavior, using v2 as the reference. That said, given my C skills, this would definitely need a careful review before merging.

This is a bit of a detour from the original ADJ-RIB-Out goal, but I think getting the current BMP implementation in v3 into a solid state is probably a good first step before extending it further.

Thanks again for the feedback, happy to iterate or adjust direction based on what you think makes the most sense.

Best,
Matthieu

On Wednesday, 14 January 2026 at 15:39, Maria Matejka via Bird-users <bird-users at network.cz> wrote:

> Dear Matthieu,
>
> thank you for your patch!
>
> On Wed, Jan 14, 2026 at 07:50:29AM +0000, Matthieu Gouel via Bird-users wrote:
>
>> Currently, the (preliminary) BMP protocol implementation in BIRD does not support ADJ-RIB-Out monitoring. Only ADJ-RIB-In pre- and post-policy are supported at the moment.
>>
>> I have implemented support for ADJ-RIB-Out post-policy monitoring, which is relatively straightforward to add. The proposed implementation is available here:
>>
>> https://github.com/CZ-NIC/bird/compare/master…matthieugouel:bird:bmp-adj-rib-out
>>
>> I have not implemented ADJ-RIB-Out pre-policy yet, as this would require more intrusive changes related to export tables.
>
> I suspect that you don’t export from the out_table actually, you are using the main table instead if I read your patch correctly.
>
> Also, your commit is missing documentation in doc/bird.sgml, as well as supported RFC in proto/bmp/bmp.c header.
>
> You should also check mergability of your patch with the thread-next branch, as if I remember correctly, the out_table is implemented there completely differently.
>
> Last but not least, I would love to see a commit on top of https://gitlab.nic.cz/labs/bird-tools/ in the netlab folder as an automatic test suite. David Petera (cc) is currently working on BMP tests for other scenarios, and it might be worth consulting this topic with him.
>
>> I would be interested to know whether this is something you would consider merging. More generally, is there interest in extending BMP support in BIRD with additional features? I know that BMP is still marked as preliminary and not production-ready, but it is a protocol I personally rely on quite heavily.
>
> BMP should be production-worthy and we do consider merging BMP extensions.
>
> Please note, however, that BGP export is a very hot path and one should very much think about what is being done there, performance-wise. That deserves at least a warning in the documentation, so that somebody doesn’t unknowingly turn their router into a traffic generator.
>
> More specifically, the BMP implementation still severely lacks update merging, and there have been some very serious thoughts about merging the BMP TX with BGP TX data structures (which would do the update merging). With that, I would suggest informing us about your plans beforehand, so that we can plan around accordingly.
>
> Have a nice day!
> Maria
>
>> Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260115/4558ec53/attachment.htm>


More information about the Bird-users mailing list