summaryrefslogtreecommitdiff
path: root/proto/bmp
AgeCommit message (Collapse)Author
2023-08-22BMP: Improve peer_down handlingOndrej Zajicek
Move all bmp_peer_down() calls to one place and make it synchronous with BGP session down, ensuring that BMP receives peer_down before route withdraws from flushing. Also refactor bmp_peer_down_() message generating code.
2023-08-21BMP: Use generic channel feed instead of direct walk over rtableOndrej Zajicek
Now we use rt_notify() and channels for both feed and notifications, in both import tables (pre-policy) and regular tables (post-policy). Remove direct walk in bmp_route_monitor_snapshot().
2023-08-18BMP: Fix route timestampsOndrej Zajicek
2023-08-18BMP: Refactor route monitoringOndrej Zajicek
- Manage BMP state through bmp_peer, bmp_stream, bmp_table structures - Use channels and rt_notify() hook for route announcements - Add support for post-policy monitoring - Send End-of-RIB even when there is no routes - Remove rte_update_in_notify() hook from import tables - Update import tables to support channels - Add bmp_hack (no feed / no flush) flag to channels
2023-08-01BMP: Remove useless bufferOndrej Zajicek
2023-08-01BMP: Simplify route monitoring hooksOndrej Zajicek
No need for *_begin(), *_commit(), and *_end() hooks. The hook *_notify() is sufficient for everything.
2023-06-08BMP: Ensure that bmp_fire_tx() does nothing when not upOndrej Zajicek
2023-06-08BMP: Support multiple instances of BMP protocolOndrej Zajicek
Add internal BMP functions with plicit bmp_proto *p as first argument, which allows using TRACE() macro. Keep list of BMP instances and call internal functions. Old BMP functions are wrappers that call internal functions for all enabled BMP instances. Extract End-of-RIB mark into separate function. Based on patch from Michal Zagorski <mzagorsk@akamai.com>. Thanks!
2023-05-31BMP: Fix bug in buffer resizeOndrej Zajicek
The buffer code in bmp_buffer_grow(), reuse the MRT buffer handling code. Based on comments by Michal Zagorski <mzagorsk@akamai.com>, Thanks!
2023-05-31BMP: Proper reconfiguration and protocol statusOndrej Zajicek
Based on patches from Michal Zagorski <mzagorsk@akamai.com> co-authored with Pawel Maslanka <pmaslank@akamai.com>. Thanks!
2023-05-30BMP: Add station address checkOndrej Zajicek
Also, do not initialize it to IPA_NONE4, use regular IPA_NONE.
2023-05-30BMP: Add local address optionMichal Zagorski
Also remove unused local and ip_post_policy options. Co-authored with Pawel Maslanka <pmaslank@akamai.com>. Minor changes by committer.
2023-05-30BMP: Minor formatting cleanupsOndrej Zajicek
Based on patches from Michal Zagorski <mzagorsk@akamai.com> co-authored with Pawel Maslanka <pmaslank@akamai.com>. Thanks!
2023-05-01BMP: Use OPEN messages stored in BGPOndrej Zajicek
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.
2023-04-20BMP: Silence some log messagesOndrej Zajicek
Hooks called from BGP to BMP should not log warning when BMP is not connected, that is not an error (and we do not want to flood logs with a ton of messages). Blocked sk_send() should not log warning, that is expected situation. Error during sk_send() is handled in error hook anyway.
2023-04-20BMP: Fix connection managementOndrej Zajicek
Replace broken TCP connection management with a simple state machine. Handle failed attempts properly with a timeout, detect and handle TCP connection close and try to reconnect after that. Remove useless 'station_connected' flag. Keep open messages saved even after the BMP session establishment, so they can be used after BMP session flaps. Use proper log messages for session events.
2023-04-18BMP: Fix reconfigurationOndrej Zajicek
It is not supported, but at least it must update internal config pointer to not keep old one.
2023-04-18BMP: Allow build without BMP and disable BMP build by defaultOndrej Zajicek
It has still several important issues to be enabled by default.
2023-04-18BMP: Move initialization to bmp_start()Ondrej Zajicek
That fixes BMP socket allocation from an invalid pool.
2023-04-18BMP: Fix missing templateOndrej Zajicek
It is mandatory for protocol.
2023-04-16BMP: Add some missing bmp_buffer_free() callsOndrej Zajicek (work)
They were inadvertently removed during recent code refactoring. Thanks to Dawid Macek for the bugreport and patch.
2023-04-16BMP: Remove duplicate functions for update encodingOndrej Zajicek (work)
Use existing BGP functions also for BMP update encoding.
2023-04-16BMP: Integrate bmp_conn to bmp_protoOndrej Zajicek (work)
There is only one socket per BMP instance, no need to have separate struct (like in BGP).
2023-04-16BMP: Minor cleanupsOndrej Zajicek (work)
Remove redundant 'disable' option, simplify IP address serialization, and remove useless macros.
2023-04-16BMP: Do not use global instance ptr internallyOndrej Zajicek (work)
Use local variable to refence relevant instance instead of using global instance ptr. Also, use 'p' variable instead of 'bmp' so we can use common macros like TRACE().
2023-04-16BMP: Remove superfluous error handlingOndrej Zajicek (work)
Most error handling code was was for cases that cannot happen, or they would be code bugs (and should use ASSERT()). Keep error handling for just for I/O errors, like in rest of BIRD.
2023-04-16BMP protocol supportPawel Maslanka
Initial implementation of a basic subset of the BMP (BGP Monitoring Protocol, RFC 7854) from Akamai team. Submitted for further review and improvement.