]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: do not include bgpd headers in route_opaque.h
authorRenato Westphal <renato@opensourcerouting.org>
Tue, 21 Sep 2021 01:11:18 +0000 (22:11 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 23 Nov 2021 17:24:07 +0000 (14:24 -0300)
Duplicate a couple of definitions in order to remove the bgpd
includes from this libfrr header. This is necessary to fix some
name collisions like PREFIX_LIST_IN being defined differently on
multiple daemons (as soon as other daemons start including
route_opaque.h).

Including daemon headers on libfrr headers is a bad practice and
should be avoided whenever possible.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
bgpd/bgp_zebra.c
lib/route_opaque.h

index a9d9b8d39383e806910acb76c268195c65fe434c..48ed07926c790dee25e232c32723a918a53a976c 100644 (file)
@@ -65,6 +65,8 @@
 #include "bgpd/bgp_evpn_mh.h"
 #include "bgpd/bgp_mac.h"
 #include "bgpd/bgp_trace.h"
+#include "bgpd/bgp_community.h"
+#include "bgpd/bgp_lcommunity.h"
 
 /* All information about zebra. */
 struct zclient *zclient = NULL;
index c5e7d6a327a8b8fade9244e4cc0aae65c8611f67..678a171e48099927843f54be163c7779f0658971 100644 (file)
 #include "assert.h"
 #include "zclient.h"
 
-#include "bgpd/bgp_aspath.h"
-#include "bgpd/bgp_community.h"
-#include "bgpd/bgp_lcommunity.h"
+/* copied from bgpd/bgp_community.h */
+#define COMMUNITY_SIZE 4
+/* copied from bgpd/bgp_lcommunity.h */
+#define LCOMMUNITY_SIZE 12
+/* copied from bgpd/bgp_route.h */
+#define BGP_MAX_SELECTION_REASON_STR_BUF 32
 
 struct bgp_zebra_opaque {
        char aspath[256];