diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2023-08-22 01:24:21 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2023-08-22 01:26:06 +0200 |
commit | 4558adabfbbe3696156d20767168010d6238f434 (patch) | |
tree | 43f17ffb951f75cb3dc70401b98a422dada87b8b /proto/bmp/bmp.h | |
parent | 52641e086675832e9f43f86237b0cddbd5ec551e (diff) |
BMP: Improve peer_down handling
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.
Diffstat (limited to 'proto/bmp/bmp.h')
-rw-r--r-- | proto/bmp/bmp.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/proto/bmp/bmp.h b/proto/bmp/bmp.h index e51c2ea0..2d700c25 100644 --- a/proto/bmp/bmp.h +++ b/proto/bmp/bmp.h @@ -116,14 +116,13 @@ bmp_peer_up(struct bgp_proto *bgp, * established state */ void -bmp_peer_down(const struct bgp_proto *bgp, const int err_class, const byte *pkt, - size_t pkt_size); +bmp_peer_down(const struct bgp_proto *bgp, int err_class, int code, int subcode, const byte *data, int length); #else /* BMP build disabled */ -static inline void bmp_peer_up(const struct bgp_proto *bgp UNUSED, const byte *tx_open_msg UNUSED, uint tx_open_length UNUSED, const byte *rx_open_msg UNUSED, uint rx_open_length UNUSED) { } -static inline void bmp_peer_down(const struct bgp_proto *bgp UNUSED, const int err_class UNUSED, const byte *pkt UNUSED, size_t pkt_size UNUSED) { } +static inline void bmp_peer_up(struct bgp_proto *bgp UNUSED, const byte *tx_open_msg UNUSED, uint tx_open_length UNUSED, const byte *rx_open_msg UNUSED, uint rx_open_length UNUSED) { } +static inline void bmp_peer_down(const struct bgp_proto *bgp UNUSED, const int err_class UNUSED, int code UNUSED, int subcode UNUSED, const byte *data UNUSED, int length UNUSED) { } #endif /* CONFIG_BMP */ |