summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_vrf.h
diff options
context:
space:
mode:
authorvishaldhingra <vdhingra@vmware.com>2018-10-11 19:44:55 +0200
committervishaldhingra <vdhingra@vmware.com>2018-10-11 19:44:55 +0200
commitac6eebce505fa54e27dd5d70ad56f5d96d99bd9d (patch)
treecf44f497d43e8390777e0112815be9096c73832a /zebra/zebra_vrf.h
parentMerge pull request #3032 from donaldsharp/bgp_info (diff)
downloadfrr-ac6eebce505fa54e27dd5d70ad56f5d96d99bd9d.tar.xz
frr-ac6eebce505fa54e27dd5d70ad56f5d96d99bd9d.zip
zebra: vrf aware routmap is missing in Zebra #2802(Part 1 of 4)
Work to handle the route-maps, namely the header changes in zebra_vrf.h and the mapping of using that everywhere Signed-off-by: vishaldhingra vdhingra@vmware.com
Diffstat (limited to 'zebra/zebra_vrf.h')
-rw-r--r--zebra/zebra_vrf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zebra_vrf.h b/zebra/zebra_vrf.h
index b8664f4ec..b676ff126 100644
--- a/zebra/zebra_vrf.h
+++ b/zebra/zebra_vrf.h
@@ -32,6 +32,11 @@ typedef struct mpls_srgb_t_ {
uint32_t end_label;
} mpls_srgb_t;
+struct zebra_rmap {
+ char *name;
+ struct route_map *map;
+};
+
/* Routing table instance. */
struct zebra_vrf {
/* Back pointer */
@@ -92,6 +97,9 @@ struct zebra_vrf {
struct zebra_pw_head pseudowires;
struct zebra_static_pw_head static_pseudowires;
+ struct zebra_rmap proto_rm[AFI_MAX][ZEBRA_ROUTE_MAX + 1];
+ struct zebra_rmap nht_rm[AFI_MAX][ZEBRA_ROUTE_MAX + 1];
+
/* MPLS processing flags */
uint16_t mpls_flags;
#define MPLS_FLAG_SCHEDULE_LSPS (1 << 0)
@@ -122,6 +130,10 @@ struct zebra_vrf {
uint64_t lsp_installs;
uint64_t lsp_removals;
};
+#define PROTO_RM_NAME(zvrf, afi, rtype) zvrf->proto_rm[afi][rtype].name
+#define NHT_RM_NAME(zvrf, afi, rtype) zvrf->nht_rm[afi][rtype].name
+#define PROTO_RM_MAP(zvrf, afi, rtype) zvrf->proto_rm[afi][rtype].map
+#define NHT_RM_MAP(zvrf, afi, rtype) zvrf->nht_rm[afi][rtype].map
static inline vrf_id_t zvrf_id(struct zebra_vrf *zvrf)
{