]> git.ipfire.org Git - thirdparty/bird.git/commit
BMP: Use OPEN messages stored in BGP
authorOndrej Zajicek <santiago@crfreenet.org>
Mon, 1 May 2023 01:35:21 +0000 (03:35 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Mon, 1 May 2023 02:01:16 +0000 (04:01 +0200)
commitaa3c35498d3c5ae7ec7fd34bf8758652fc2748f1
tree0dbc93b90c195c6fbc91d76da60870c6925115c5
parent1be0be1b71f0127740a4aa6f35d4a256d6c34fb9
BMP: Use OPEN messages stored in BGP

The BMP protocol needs OPEN messages of established BGP sessions to
construct appropriate Peer Up messages. Instead of saving them internally
we use OPEN messages stored in BGP instances. This allows BMP instances
to be restarted or enabled later.

Because of this change, we can simplify BMP data structures. No need to
keep track of BGP sessions when we are not started. We have to iterate
over all (established) BGP sessions when the BMP session is established.
This is just a scaffolding now, but some kind of iteration would be
necessary anyway.

Also, the commit cleans up handling of msg/msg_length arguments to be
body/body_length consistently in both rx/tx and peer_up/peer_down calls.
proto/bgp/bgp.c
proto/bgp/packets.c
proto/bmp/bmp.c
proto/bmp/bmp.h