summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_evpn.h
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-11-02 11:38:01 +0100
committerMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-12-14 19:57:07 +0100
commit94c2f693a44460f5f741863da5980bd1bb7c01d9 (patch)
treee9d65df7536d0d7e3e9bbffe9dd542c16abbc982 /bgpd/bgp_evpn.h
parentbgpd: update type-5 routes when RD changes (diff)
downloadfrr-94c2f693a44460f5f741863da5980bd1bb7c01d9.tar.xz
frr-94c2f693a44460f5f741863da5980bd1bb7c01d9.zip
bgpd: evpn enabled should only be checked for default instance
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn.h')
-rw-r--r--bgpd/bgp_evpn.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn.h b/bgpd/bgp_evpn.h
index 488ebf686..63985a59a 100644
--- a/bgpd/bgp_evpn.h
+++ b/bgpd/bgp_evpn.h
@@ -22,9 +22,18 @@
#define _QUAGGA_BGP_EVPN_H
#include "vxlan.h"
+#include "bgpd.h"
#define EVPN_ROUTE_STRLEN 200 /* Must be >> MAC + IPv6 strings. */
+static inline int is_evpn_enabled(void)
+{
+ struct bgp *bgp = NULL;
+
+ bgp = bgp_get_default();
+ return bgp ? bgp->advertise_all_vni : 0;
+}
+
extern void bgp_evpn_withdraw_type5_routes(struct bgp *bgp_vrf, afi_t afi);
extern void bgp_evpn_advertise_type5_routes(struct bgp *bgp_vrf, afi_t afi);
extern void bgp_evpn_vrf_delete(struct bgp *);