0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-19 20:05:21 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
Ondrej Zajicek
57da33172c BMP: Silence some log messages
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.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek
8f78c232f6 BMP: Fix connection management
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.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek
62aa714175 BMP: Fix reconfiguration
It is not supported, but at least it must update internal config
pointer to not keep old one.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek
2f62d91b61 BMP: Allow build without BMP and disable BMP build by default
It has still several important issues to be enabled by default.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek
f965e12d07 BMP: Move initialization to bmp_start()
That fixes BMP socket allocation from an invalid pool.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek
549d8a991d BMP: Fix missing template
It is mandatory for protocol.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek (work)
106d206728 BMP: Add some missing bmp_buffer_free() calls
They were inadvertently removed during recent code refactoring.

Thanks to Dawid Macek for the bugreport and patch.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek (work)
9a9752bfbe BMP: Remove duplicate functions for update encoding
Use existing BGP functions also for BMP update encoding.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek (work)
e7789317b2 BMP: Integrate bmp_conn to bmp_proto
There is only one socket per BMP instance, no need to have separate
struct (like in BGP).
2024-05-30 12:30:00 +02:00
Ondrej Zajicek (work)
767c820e57 BMP: Minor cleanups
Remove redundant 'disable' option, simplify IP address serialization,
and remove useless macros.
2024-05-30 12:30:00 +02:00
Ondrej Zajicek (work)
3ab2dd3fd3 BMP: Do not use global instance ptr internally
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().
2024-05-30 12:30:00 +02:00
Ondrej Zajicek (work)
43b3ea8c64 BMP: Remove superfluous error handling
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.
2024-05-30 12:30:00 +02:00
Pawel Maslanka
25598fdf11 BMP protocol support
Initial implementation of a basic subset of the BMP (BGP Monitoring
Protocol, RFC 7854) from Akamai team. Submitted for further review
and improvement.
2024-05-30 12:30:00 +02:00