summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 12ee9961d5..5f457a6fc5 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1114,6 +1114,7 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, struct rib *old)
rib_table_info_t *info = srcdest_rnode_table_info(rn);
int recursing;
struct prefix *p, *src_p;
+ struct zebra_vrf *zvrf = vrf_info_lookup (rib->vrf_id);
srcdest_rnode_prefixes (rn, &p, &src_p);
@@ -1130,6 +1131,7 @@ rib_install_kernel (struct route_node *rn, struct rib *rib, struct rib *old)
*/
hook_call(rib_update, rn, "installing in kernel");
ret = kernel_route_rib (p, src_p, old, rib);
+ zvrf->installs++;
/* If install succeeds, update FIB flag for nexthops. */
if (!ret)
@@ -1158,6 +1160,7 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib)
rib_table_info_t *info = srcdest_rnode_table_info(rn);
int recursing;
struct prefix *p, *src_p;
+ struct zebra_vrf *zvrf = vrf_info_lookup (rib->vrf_id);
srcdest_rnode_prefixes (rn, &p, &src_p);
@@ -1174,6 +1177,7 @@ rib_uninstall_kernel (struct route_node *rn, struct rib *rib)
*/
hook_call(rib_update, rn, "uninstalling from kernel");
ret = kernel_route_rib (p, src_p, rib, NULL);
+ zvrf->removals++;
for (ALL_NEXTHOPS_RO(rib->nexthop, nexthop, tnexthop, recursing))
UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB);