summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rnh.h
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-02-26 20:13:34 +0100
committervivek <vivek@cumulusnetworks.com>2016-02-26 20:13:34 +0100
commitd82ae0dedc6b995309a7590ed3bb6a17970206a8 (patch)
tree03e606bb40e7577c1346c12bdb1de664ae49f31b /zebra/zebra_rnh.h
parentQuagga: Implement VRF change semantics for an interface (diff)
downloadfrr-d82ae0dedc6b995309a7590ed3bb6a17970206a8.tar.xz
frr-d82ae0dedc6b995309a7590ed3bb6a17970206a8.zip
Zebra: Fix static NHT to work properly in a VRF
Implement VRF support for static nexthop resolution (NHT). This is achieved by ensuring the correct VRF is passed as a parameter to the NHT functions and is stored in the registered nexthop data structure. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Ticket: CM-9457 Reviewed By: CCR-4185 Testing Done: Manual verification
Diffstat (limited to 'zebra/zebra_rnh.h')
-rw-r--r--zebra/zebra_rnh.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/zebra/zebra_rnh.h b/zebra/zebra_rnh.h
index b76651aa7..0732a4f92 100644
--- a/zebra/zebra_rnh.h
+++ b/zebra/zebra_rnh.h
@@ -35,6 +35,9 @@ struct rnh
#define ZEBRA_NHT_DELETED 0x2
#define ZEBRA_NHT_EXACT_MATCH 0x4
+ /* VRF identifier. */
+ vrf_id_t vrf_id;
+
struct rib *state;
struct prefix resolved_route;
struct list *client_list;
@@ -59,9 +62,10 @@ extern struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid,
extern void zebra_delete_rnh(struct rnh *rnh, rnh_type_t type);
extern void zebra_add_rnh_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
vrf_id_t vrfid);
-extern void zebra_register_rnh_static_nh(struct prefix *, struct route_node *);
-extern void zebra_deregister_rnh_static_nexthops (struct nexthop *nexthop, struct route_node *rn);
-extern void zebra_deregister_rnh_static_nh(struct prefix *, struct route_node *);
+extern void zebra_register_rnh_static_nh(vrf_id_t, struct prefix *, struct route_node *);
+extern void zebra_deregister_rnh_static_nexthops (vrf_id_t, struct nexthop *nexthop,
+ struct route_node *rn);
+extern void zebra_deregister_rnh_static_nh(vrf_id_t, struct prefix *, struct route_node *);
extern void zebra_remove_rnh_client(struct rnh *rnh, struct zserv *client,
rnh_type_t type);
extern void zebra_evaluate_rnh(vrf_id_t vrfid, int family, int force, rnh_type_t type,