]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP/BMP: fixed build with no bmp at all
authorMaria Matejka <mq@ucw.cz>
Thu, 12 Oct 2023 08:57:55 +0000 (10:57 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 12 Oct 2023 08:57:55 +0000 (10:57 +0200)
proto/bgp/bgp.c
proto/bgp/packets.c

index a6e9cf8394d77434e6d55e2db33032756272dbe5..7ae688f50fa7feacc5d465c4c733ed5f2d31b287 100644 (file)
 #include "lib/string.h"
 
 #include "bgp.h"
+#ifdef CONFIG_BMP
 #include "proto/bmp/bmp.h"
+#endif
 
 
 static list STATIC_LIST_INIT(bgp_sockets);             /* Global list of listening sockets */
@@ -692,8 +694,11 @@ bgp_conn_enter_established_state(struct bgp_conn *conn)
 
   bgp_conn_set_state(conn, BS_ESTABLISHED);
   proto_notify_state(&p->p, PS_UP);
+
+#ifdef CONFIG_BMP
   bmp_peer_up(p, conn->local_open_msg, conn->local_open_length,
              conn->remote_open_msg, conn->remote_open_length);
+#endif
 }
 
 static void
@@ -706,9 +711,11 @@ bgp_conn_leave_established_state(struct bgp_conn *conn, struct bgp_proto *p)
   if (p->p.proto_state == PS_UP)
     bgp_stop(p, 0, NULL, 0);
 
+#ifdef CONFIG_BMP
   bmp_peer_down(p, p->last_error_class,
                conn->notify_code, conn->notify_subcode,
                conn->notify_data, conn->notify_size);
+#endif
 }
 
 void
index 6b11eaf7ef13c76eb8cfd00d9e3f43b28fa29783..ff51e309f72d5cb3ad927d00d0795681c35afb45 100644 (file)
@@ -26,7 +26,9 @@
 #include "nest/cli.h"
 
 #include "bgp.h"
+#ifdef CONFIG_BMP
 #include "proto/bmp/bmp.h"
+#endif
 
 
 #define BGP_RR_REQUEST         0